OpenBSD CVS

CVS log for src/usr.sbin/ospfd/neighbor.c


[BACK] Up to [local] / src / usr.sbin / ospfd

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.51 / (download) - annotate - [select for diffs], Wed Mar 8 04:43:14 2023 UTC (14 months, 3 weeks ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, HEAD
Changes since 1.50: +1 -3 lines
Diff to previous 1.50 (colored)

Delete obsolete /* ARGSUSED */ lint comments.

ok miod@ millert@

Revision 1.50 / (download) - annotate - [select for diffs], Wed Nov 3 21:40:03 2021 UTC (2 years, 6 months ago) by sthen
Branch: MAIN
CVS Tags: OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1
Changes since 1.49: +17 -11 lines
Diff to previous 1.49 (colored)

log the interface along with the neighbour ID in various ospfd/ospf6d
messages.  ok remi@ benno@

if a neighbour is reachable over multiple network links, some problems
may be related to the link itself rather than the neighbour, so knowing
the interface can be important when trying to locate the source of a
problem.

Revision 1.49 / (download) - annotate - [select for diffs], Tue Nov 19 09:55:55 2019 UTC (4 years, 6 months ago) by remi
Branch: MAIN
CVS Tags: OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7
Changes since 1.48: +2 -1 lines
Diff to previous 1.48 (colored)

Add point-to-point support for broadcast interfaces.

tested by Kapetanakis Giannis
ok claudio@

Revision 1.48 / (download) - annotate - [select for diffs], Fri Feb 9 02:14:03 2018 UTC (6 years, 3 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_6_6_BASE, OPENBSD_6_6, OPENBSD_6_5_BASE, OPENBSD_6_5, OPENBSD_6_4_BASE, OPENBSD_6_4, OPENBSD_6_3_BASE, OPENBSD_6_3
Changes since 1.47: +6 -8 lines
Diff to previous 1.47 (colored)

Simplify logic a bit by moving a block. nbr_stop_itimer() does not use
the dr or bdr fields so clear them first.

Revision 1.47 / (download) - annotate - [select for diffs], Sun Nov 22 13:09:10 2015 UTC (8 years, 6 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_6_2_BASE, OPENBSD_6_2, OPENBSD_6_1_BASE, OPENBSD_6_1, OPENBSD_6_0_BASE, OPENBSD_6_0, OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.46: +1 -2 lines
Diff to previous 1.46 (colored)

Improve ABR support especially for self-originated stub networks.
This seems to solve the last issues people reported when using ospfd
in multiple areas. OK sthen@ prodding by deraadt@

Revision 1.46 / (download) - annotate - [select for diffs], Thu Jan 17 10:07:56 2013 UTC (11 years, 4 months ago) by markus
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8, OPENBSD_5_7_BASE, OPENBSD_5_7, OPENBSD_5_6_BASE, OPENBSD_5_6, OPENBSD_5_5_BASE, OPENBSD_5_5, OPENBSD_5_4_BASE, OPENBSD_5_4, OPENBSD_5_3_BASE, OPENBSD_5_3
Changes since 1.45: +13 -4 lines
Diff to previous 1.45 (colored)

improve snapshot handling:
- don't start a new snapshot if we are already in NBR_STA_SNAP
- ignore IMSG_DB_SNAPSHOT and IMSG_DB_END unless we are in NBR_STA_SNAP
- add new IMSG_LS_SNAP message so we can distinguish it from
  IMSG_LS_UPD. this way we can ignore them if we are not in NBR_STA_SNAP
ok claudio@

Revision 1.45 / (download) - annotate - [select for diffs], Thu Jan 17 10:02:04 2013 UTC (11 years, 4 months ago) by markus
Branch: MAIN
Changes since 1.44: +2 -2 lines
Diff to previous 1.44 (colored)

ignore the nbr_adj_timer if we are not forming adjacencies; ok claudio

Revision 1.44 / (download) - annotate - [select for diffs], Thu Jan 17 09:58:15 2013 UTC (11 years, 4 months ago) by markus
Branch: MAIN
Changes since 1.43: +2 -2 lines
Diff to previous 1.43 (colored)

transmit correct state to RDE; ok claudio

Revision 1.43 / (download) - annotate - [select for diffs], Mon May 9 12:24:41 2011 UTC (13 years ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_5_2_BASE, OPENBSD_5_2, OPENBSD_5_1_BASE, OPENBSD_5_1, OPENBSD_5_0_BASE, OPENBSD_5_0
Changes since 1.42: +5 -2 lines
Diff to previous 1.42 (colored)

First bits to support opaque LSA. Type-9, 10 and 11 are LSA that can
hold about any data you like and is used for things like greaceful
reload. Implement the basic redistribute logic and LSDB handling but
the data sent is currently not looked at.
Tested and OK sthen@

Revision 1.42 / (download) - annotate - [select for diffs], Thu Mar 24 08:35:59 2011 UTC (13 years, 2 months ago) by claudio
Branch: MAIN
Changes since 1.41: +3 -2 lines
Diff to previous 1.41 (colored)

Fix some memory leaks. Mainly better cleanup on shutdown but the v_nexthop
leak is a runtime one.
OK bluhm@

Revision 1.41 / (download) - annotate - [select for diffs], Fri May 7 22:32:34 2010 UTC (14 years ago) by sthen
Branch: MAIN
CVS Tags: OPENBSD_4_9_BASE, OPENBSD_4_9, OPENBSD_4_8_BASE, OPENBSD_4_8
Changes since 1.40: +3 -3 lines
Diff to previous 1.40 (colored)

When failing to form an adjacency, log the interface name as well
as the neighbour. ok claudio@

Revision 1.40 / (download) - annotate - [select for diffs], Tue Feb 16 18:13:52 2010 UTC (14 years, 3 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.39: +6 -2 lines
Diff to previous 1.39 (colored)

Clear the DR and BDR addresses in nbr_act_delete(), makes the election
process more reliable after interface flaps. Especially when the router-id
changed at the same time.
OK dlg@, sthen@

Revision 1.39 / (download) - annotate - [select for diffs], Wed Sep 30 14:39:07 2009 UTC (14 years, 8 months ago) by claudio
Branch: MAIN
Changes since 1.38: +0 -5 lines
Diff to previous 1.38 (colored)

Oups, these changes should not have been commited. Revert.

Revision 1.38 / (download) - annotate - [select for diffs], Wed Sep 30 14:37:11 2009 UTC (14 years, 8 months ago) by claudio
Branch: MAIN
Changes since 1.37: +6 -1 lines
Diff to previous 1.37 (colored)

Announce a stub network LSA for backup carp interfaces. This should help
when fail-over happens, since removing the better route will not result
in a blackhole until the update from the new master is processed.
Tested, OK and input sthen@, phessler@

Revision 1.37 / (download) - annotate - [select for diffs], Mon Feb 11 12:37:37 2008 UTC (16 years, 3 months ago) by norby
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6, OPENBSD_4_5_BASE, OPENBSD_4_5, OPENBSD_4_4_BASE, OPENBSD_4_4, OPENBSD_4_3_BASE, OPENBSD_4_3
Changes since 1.36: +2 -2 lines
Diff to previous 1.36 (colored)

Correct the output of several error and debug messages.

Revision 1.36 / (download) - annotate - [select for diffs], Thu Oct 11 08:21:29 2007 UTC (16 years, 7 months ago) by claudio
Branch: MAIN
Changes since 1.35: +5 -5 lines
Diff to previous 1.35 (colored)

Do not overload nbr->options with the dd exchange bits. nbr->options is used
by the hello protocol. Instead add a dd_more flag that is used together with
(the renamed) dd_master flag.
Tested and OK norby@

Revision 1.35 / (download) - annotate - [select for diffs], Wed Jun 13 17:47:52 2007 UTC (16 years, 11 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_4_2_BASE, OPENBSD_4_2
Changes since 1.34: +3 -2 lines
Diff to previous 1.34 (colored)

NBR_ACT_HELLO_CHK was missing in the nbr_action_names list.

Revision 1.34 / (download) - annotate - [select for diffs], Wed Jan 24 14:08:28 2007 UTC (17 years, 4 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_4_1_BASE, OPENBSD_4_1
Changes since 1.33: +12 -1 lines
Diff to previous 1.33 (colored)

When deleting a neighbor or a interface make sure that no events are pending.
Needed for reload support.  OK norby@

Revision 1.33 / (download) - annotate - [select for diffs], Sun Aug 6 12:36:23 2006 UTC (17 years, 10 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_4_0_BASE, OPENBSD_4_0
Changes since 1.32: +2 -2 lines
Diff to previous 1.32 (colored)

Remove a XXX in a comment.

Revision 1.32 / (download) - annotate - [select for diffs], Mon Mar 13 09:36:06 2006 UTC (18 years, 2 months ago) by claudio
Branch: MAIN
Changes since 1.31: +24 -41 lines
Diff to previous 1.31 (colored)

The return value of the start/stop timer functions is almost never checked.
Switch them to void functions and check if evtimer_add/del fails -- in which
case we fatal() as there is no useful way to recover in such an event.
OK norby@

Revision 1.31 / (download) - annotate - [select for diffs], Thu Mar 9 15:43:21 2006 UTC (18 years, 2 months ago) by claudio
Branch: MAIN
Changes since 1.30: +5 -45 lines
Diff to previous 1.30 (colored)

Move *_name functions to log.c and use these for both ospfd and ospfctl.
Stuff that is only used in ospfd debug messages is simplified.
OK norby@

Revision 1.30 / (download) - annotate - [select for diffs], Sun Feb 19 21:48:56 2006 UTC (18 years, 3 months ago) by norby
Branch: MAIN
CVS Tags: OPENBSD_3_9_BASE, OPENBSD_3_9
Changes since 1.29: +10 -1 lines
Diff to previous 1.29 (colored)

Keep track of the duration of our relationships with neighbors.
Displayed in "ospfctl show neighbor".

ok claudio@

Revision 1.29 / (download) - annotate - [select for diffs], Sun Feb 19 19:23:17 2006 UTC (18 years, 3 months ago) by norby
Branch: MAIN
Changes since 1.28: +4 -1 lines
Diff to previous 1.28 (colored)

Do not kick the adj_timer for neighbors that are in state 2-Way.

ok claudio@

Revision 1.28 / (download) - annotate - [select for diffs], Sun Feb 19 18:55:47 2006 UTC (18 years, 3 months ago) by norby
Branch: MAIN
Changes since 1.27: +2 -6 lines
Diff to previous 1.27 (colored)

Do not traverse the entire LS retransmission list to figure out how many
are present on it.

ok claudio@

Revision 1.27 / (download) - annotate - [select for diffs], Thu Feb 9 15:23:08 2006 UTC (18 years, 3 months ago) by norby
Branch: MAIN
Changes since 1.26: +5 -2 lines
Diff to previous 1.26 (colored)

Prevent the neighbor FSM from getting stuck forever in state EXSTART.

ok claudio@

Revision 1.26 / (download) - annotate - [select for diffs], Thu Dec 15 20:29:06 2005 UTC (18 years, 5 months ago) by claudio
Branch: MAIN
Changes since 1.25: +5 -7 lines
Diff to previous 1.25 (colored)

Simpify iface_del() and nbr_del(). make them void funtions as they can not fail
and do not remove a element twice in iface_del(). OK norby@

Revision 1.25 / (download) - annotate - [select for diffs], Wed Oct 19 21:46:21 2005 UTC (18 years, 7 months ago) by claudio
Branch: MAIN
Changes since 1.24: +5 -4 lines
Diff to previous 1.24 (colored)

Add neighbor ID in warning and use correct function names.

Revision 1.24 / (download) - annotate - [select for diffs], Thu Sep 29 15:14:57 2005 UTC (18 years, 8 months ago) by claudio
Branch: MAIN
Changes since 1.23: +5 -2 lines
Diff to previous 1.23 (colored)

Show the time a neighbor was DOWN instead of counting down from
DEFAULT_NBR_TMOUT. Makes it easy to see since when a peer is dead.
OK norby@ some time ago

Revision 1.23 / (download) - annotate - [select for diffs], Mon Jun 13 08:32:29 2005 UTC (18 years, 11 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_3_8_BASE, OPENBSD_3_8
Changes since 1.22: +18 -17 lines
Diff to previous 1.22 (colored)

simplify the fsm by moving all the checks that are done if the state changed
into one if (old_state != nbr->state) { block.
OK norby@

Revision 1.22 / (download) - annotate - [select for diffs], Fri May 27 08:44:43 2005 UTC (19 years ago) by norby
Branch: MAIN
Changes since 1.21: +5 -1 lines
Diff to previous 1.21 (colored)

When the neighbor at the other end of the virtual link goes to state
full, originate a new router LSA.

ok claudio@

Revision 1.21 / (download) - annotate - [select for diffs], Fri May 27 02:45:15 2005 UTC (19 years ago) by norby
Branch: MAIN
Changes since 1.20: +2 -1 lines
Diff to previous 1.20 (colored)

Clearify.

Revision 1.20 / (download) - annotate - [select for diffs], Thu May 26 22:09:10 2005 UTC (19 years ago) by norby
Branch: MAIN
Changes since 1.19: +1 -3 lines
Diff to previous 1.19 (colored)

Remove unused event/action caption.

Revision 1.19 / (download) - annotate - [select for diffs], Thu May 26 20:42:10 2005 UTC (19 years ago) by norby
Branch: MAIN
Changes since 1.18: +1 -13 lines
Diff to previous 1.18 (colored)

Remove unused neighbor state.

ok claudio@

Revision 1.18 / (download) - annotate - [select for diffs], Thu May 26 20:21:09 2005 UTC (19 years ago) by norby
Branch: MAIN
Changes since 1.17: +1 -27 lines
Diff to previous 1.17 (colored)

Remove unneeded debug stuff when handling neighbors.

Revision 1.17 / (download) - annotate - [select for diffs], Thu May 12 08:55:39 2005 UTC (19 years ago) by claudio
Branch: MAIN
Changes since 1.16: +2 -1 lines
Diff to previous 1.16 (colored)

If activly connected to more than one area set B flag in the self-originated
router LSA. To do that correctly we need to track the number of active
neighbors for each area. If the routers ABR status changes all router LSA
need to be updated via orig_rtr_lsa_all().
OK norby@

Revision 1.16 / (download) - annotate - [select for diffs], Sun May 1 17:35:27 2005 UTC (19 years, 1 month ago) by david
Branch: MAIN
Changes since 1.15: +2 -2 lines
Diff to previous 1.15 (colored)

spelling

Revision 1.15 / (download) - annotate - [select for diffs], Tue Apr 12 09:54:59 2005 UTC (19 years, 1 month ago) by claudio
Branch: MAIN
Changes since 1.14: +19 -3 lines
Diff to previous 1.14 (colored)

Support for self originated AS-external LSA.
With "redistribute (static|connected|default|none)" it is possible to
tell ospfd which external routes should be announced.
Connected routes will be announced only if there is no corresponding
interface configured, in that case the prefix is not external.
Adding and removing of announced prefixes are done automaticaly.
OK norby@

Revision 1.14 / (download) - annotate - [select for diffs], Thu Mar 31 19:32:10 2005 UTC (19 years, 2 months ago) by norby
Branch: MAIN
Changes since 1.13: +3 -1 lines
Diff to previous 1.13 (colored)

Add support for crypt authentication (MD5).

ok and input claudio@

Revision 1.13 / (download) - annotate - [select for diffs], Tue Mar 22 22:13:48 2005 UTC (19 years, 2 months ago) by norby
Branch: MAIN
Changes since 1.12: +4 -4 lines
Diff to previous 1.12 (colored)

Remove bool cruft.

ok claudio@

Revision 1.12 / (download) - annotate - [select for diffs], Thu Mar 17 21:17:12 2005 UTC (19 years, 2 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_3_7_BASE, OPENBSD_3_7
Changes since 1.11: +2 -1 lines
Diff to previous 1.11 (colored)

Handle the retransmission queues correctly. Mainly iface state DROTHER
needs to be handled specially because the backup DR does not send acks and
so his retransmission queue fills up and does not get cleared.
Also implement the retransmission timeout correctly.

OK henning@ norby@ deraadt@

Revision 1.11 / (download) - annotate - [select for diffs], Thu Feb 10 14:05:48 2005 UTC (19 years, 3 months ago) by claudio
Branch: MAIN
Changes since 1.10: +8 -3 lines
Diff to previous 1.10 (colored)

Work around a timing issue in the db exchange phase. The DB description
packets comming from the net are looped through the RDE and may get
delayed because of this. The result is that the neighbor FSM ends in
state FULL instead of LOADING and so the LSDB is not correctly
synchronized. Issue found by norby@ OK norby@

Revision 1.10 / (download) - annotate - [select for diffs], Thu Feb 10 10:16:02 2005 UTC (19 years, 3 months ago) by claudio
Branch: MAIN
Changes since 1.9: +8 -8 lines
Diff to previous 1.9 (colored)

Cleanup the neighbor FSM. Use log_warnx() where appropriate and don't
use the correct enum instead of 0 in the nbr_fsm_tbl.

Revision 1.9 / (download) - annotate - [select for diffs], Wed Feb 9 20:40:23 2005 UTC (19 years, 3 months ago) by claudio
Branch: MAIN
Changes since 1.8: +13 -4 lines
Diff to previous 1.8 (colored)

Rework of self originated LSA. First of all the code to generate the LSA
is rewritten to use the dynamic buffer api introduced lately.
Add missing parts in the RDE to merge these LSA originated from the OE into
the LSDB with correct seq_num, etc.
Add hooks to the neighbor and interface fsm so that the LSA get updated if
needed. This is not perfect, still many things are missing. OK norby@

Revision 1.8 / (download) - annotate - [select for diffs], Wed Feb 9 16:14:23 2005 UTC (19 years, 3 months ago) by claudio
Branch: MAIN
Changes since 1.7: +15 -2 lines
Diff to previous 1.7 (colored)

Print the interface state from the view of the neighbor in ospfctl sh nei.
The idea is to print DR, BDR or DROther dependent on the type of the
neighbor. This is only done for multicast capable networks.

Revision 1.7 / (download) - annotate - [select for diffs], Wed Feb 9 16:08:06 2005 UTC (19 years, 3 months ago) by claudio
Branch: MAIN
Changes since 1.6: +2 -2 lines
Diff to previous 1.6 (colored)

Prevent the ADJ_TMOUT from complaining about an unexpected event.
From norby@

Revision 1.6 / (download) - annotate - [select for diffs], Wed Feb 9 15:57:57 2005 UTC (19 years, 3 months ago) by claudio
Branch: MAIN
Changes since 1.5: +14 -3 lines
Diff to previous 1.5 (colored)

Fix the restart DD case. In case of a timeout recheck the adjacency and go
to state NBR_STA_XSTRT and issue a new initial DB description packet or go
to NBR_STA_2_WAY respectivly.  OK norby@

Revision 1.5 / (download) - annotate - [select for diffs], Wed Feb 9 12:53:17 2005 UTC (19 years, 3 months ago) by claudio
Branch: MAIN
Changes since 1.4: +2 -2 lines
Diff to previous 1.4 (colored)

Print the neighbor address and not the local interface address in
ospfctl show nei.

Revision 1.4 / (download) - annotate - [select for diffs], Wed Feb 2 19:15:07 2005 UTC (19 years, 4 months ago) by henning
Branch: MAIN
Changes since 1.3: +4 -4 lines
Diff to previous 1.3 (colored)

KNF

Revision 1.3 / (download) - annotate - [select for diffs], Tue Feb 1 21:15:40 2005 UTC (19 years, 4 months ago) by norby
Branch: MAIN
Changes since 1.2: +16 -2 lines
Diff to previous 1.2 (colored)

Free neighbors that have been inactive for 24hrs.

OK claudio@

Revision 1.2 / (download) - annotate - [select for diffs], Fri Jan 28 17:53:33 2005 UTC (19 years, 4 months ago) by norby
Branch: MAIN
Changes since 1.1: +2 -2 lines
Diff to previous 1.1 (colored)

Change my email address to the OpenBSD one since Ericsson has nothing to
do with this software, just happend to be my only valid email address at
the time.

Revision 1.1 / (download) - annotate - [select for diffs], Fri Jan 28 14:05:40 2005 UTC (19 years, 4 months ago) by claudio
Branch: MAIN

Welcome ospfd
started by Esben Norby some time ago by using the imsg/three process framework
of bgpd. He implemented the basic concept plus the ospf finite state machines.
Later I joined and helped him cleanup, debug and extend his work.
Right now it is not particularly useful, major parts are still missing but is
imported to allow more people to work on it.
status:
The basic protocol works for broadcast networks and the LS database is
synchronized and updated. It is not possible to be DR or BDR on a network
and other interface types like point-to-point are not yet supported.
The shortest path tree is not calculated and so no routing information is
exchanged with the kernel FIB.

Not yet connected to the builds.
OK henning@

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.