OpenBSD CVS

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


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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.52 / (download) - annotate - [select for diffs], Wed Mar 8 04:43:14 2023 UTC (15 months 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.51: +1 -2 lines
Diff to previous 1.51 (colored)

Delete obsolete /* ARGSUSED */ lint comments.

ok miod@ millert@

Revision 1.51 / (download) - annotate - [select for diffs], Mon Oct 5 09:19:05 2020 UTC (3 years, 8 months ago) by jan
Branch: MAIN
CVS Tags: OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9
Changes since 1.50: +7 -8 lines
Diff to previous 1.50 (colored)

Remove redundant code and lets code looks similar
to the ospf6d counterpart.

OK remi@

Revision 1.50 / (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_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7, 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, 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.49: +1 -5 lines
Diff to previous 1.49 (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.49 / (download) - annotate - [select for diffs], Wed Aug 14 20:16:09 2013 UTC (10 years, 9 months ago) by claudio
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
Changes since 1.48: +6 -1 lines
Diff to previous 1.48 (colored)

Enforce that the ls_id and the adv_rtr field in a type 1 router LSA are
the same. This will drop updates trying to attack the OSPF LSDB. For
ospfd such bad router LSA were never a problem since the LSA lookup always
includes the ls_id and adv_rtr -- so the bad packets would have never been
picked up by the SPF calculation.
OK bluhm@ benno@

Revision 1.48 / (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_4_BASE, OPENBSD_5_4, OPENBSD_5_3_BASE, OPENBSD_5_3
Changes since 1.47: +2 -2 lines
Diff to previous 1.47 (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.47 / (download) - annotate - [select for diffs], Mon May 9 12:24:41 2011 UTC (13 years, 1 month 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.46: +92 -39 lines
Diff to previous 1.46 (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.46 / (download) - annotate - [select for diffs], Mon May 2 11:45:55 2011 UTC (13 years, 1 month ago) by claudio
Branch: MAIN
Changes since 1.45: +1 -3 lines
Diff to previous 1.45 (colored)

More spring cleaning

Revision 1.45 / (download) - annotate - [select for diffs], Thu Mar 24 08:36:00 2011 UTC (13 years, 2 months ago) by claudio
Branch: MAIN
Changes since 1.44: +31 -1 lines
Diff to previous 1.44 (colored)

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

Revision 1.44 / (download) - annotate - [select for diffs], Mon Jul 19 09:11:08 2010 UTC (13 years, 10 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_4_9_BASE, OPENBSD_4_9, OPENBSD_4_8_BASE, OPENBSD_4_8
Changes since 1.43: +7 -3 lines
Diff to previous 1.43 (colored)

lsa_refresh() was able to resurect dead LSA resulting in zombie anouncements.
Make sure that if the LSA is managed by this router that we force timed-out
LSA to stay timed out which causes them to be pruned in the secound round.
This problem can show up when not exactly the same LSA is pruned because
the checksum is used as tiebreaker resulting in indeterministic selection
of which LSA is considered newer.
OK bluhm@, sthen@

Revision 1.43 / (download) - annotate - [select for diffs], Thu Nov 12 22:29:15 2009 UTC (14 years, 7 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.42: +5 -1 lines
Diff to previous 1.42 (colored)

Add more paranoia in lsa_router_check(). There needs to be at least one
router link in a type-1 LSA.

Revision 1.42 / (download) - annotate - [select for diffs], Wed Jan 7 21:16:36 2009 UTC (15 years, 5 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6, OPENBSD_4_5_BASE, OPENBSD_4_5
Changes since 1.41: +47 -1 lines
Diff to previous 1.41 (colored)

Full stub area support. This allows ABRs to announce a default network
summary LSA into stub areas so that these routers are able to reach the
outside of the area.
OK norby@

Revision 1.41 / (download) - annotate - [select for diffs], Mon Nov 24 18:28:02 2008 UTC (15 years, 6 months ago) by claudio
Branch: MAIN
Changes since 1.40: +2 -2 lines
Diff to previous 1.40 (colored)

Initial support for stub areas. The bit still missing is the redistribution
of the default summary net lsa on ABRs but that is comming. OK norby@

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

Correct the output of several error and debug messages.

Revision 1.39 / (download) - annotate - [select for diffs], Tue Oct 16 21:03:31 2007 UTC (16 years, 7 months ago) by claudio
Branch: MAIN
Changes since 1.38: +4 -4 lines
Diff to previous 1.38 (colored)

Use v->type insead of v->lsa->hdr.type. Idea came while looking at ospf6d.
OK norby@

Revision 1.38 / (download) - annotate - [select for diffs], Tue Apr 10 13:26:39 2007 UTC (17 years, 2 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_4_2_BASE, OPENBSD_4_2
Changes since 1.37: +2 -1 lines
Diff to previous 1.37 (colored)

Next step in equal cost multipath support. Make the SPF calculation multipath
aware. Both the SPF and RIB trees need additional structures to store the
multiple nexthops to the destination but only the first active nexthop is
passed to the parent process and used for routing. This is the next thing
that needs to be modified. Tested and OK pyr@

Revision 1.37 / (download) - annotate - [select for diffs], Mon Jan 29 13:04:13 2007 UTC (17 years, 4 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_4_1_BASE, OPENBSD_4_1
Changes since 1.36: +12 -9 lines
Diff to previous 1.36 (colored)

Do not link from the LS DB to outside structures that may vanish before
the actual LS DB entry is removed. In particular a neighbor may be removed
at any time -- we were lucky because we kept down neighbors around for
another 24h. Reload support unhided this problem again. Just copy the
needed info into the vertex. Pointing to the area is save as the vertex is
part of the area itself and removed when the area is removed.
OK norby@

Revision 1.36 / (download) - annotate - [select for diffs], Wed Jan 24 10:48:47 2007 UTC (17 years, 4 months ago) by claudio
Branch: MAIN
Changes since 1.35: +1 -11 lines
Diff to previous 1.35 (colored)

Remove some log_debug()s that are no longer needed.

Revision 1.35 / (download) - annotate - [select for diffs], Wed Dec 13 13:24:09 2006 UTC (17 years, 6 months ago) by claudio
Branch: MAIN
Changes since 1.34: +2 -2 lines
Diff to previous 1.34 (colored)

Correct funtion name in fatal message.

Revision 1.34 / (download) - annotate - [select for diffs], Fri Dec 8 21:28:08 2006 UTC (17 years, 6 months ago) by claudio
Branch: MAIN
Changes since 1.33: +3 -2 lines
Diff to previous 1.33 (colored)

Fix a crash seen on busy area border routers. The problem was a NULL
dereference in rde_summary_update(). Even though we merge in the new LSA
it may be suppressed because the remove happened less than 5 seconds ago.
So the second lsa_find() is still unable to locate the LSA and in this case
we may not access v->cost. Additionally only remove not yet deleted LSA
in lsa_remove_invalid_sums(), removing already removed entries removes also
the suppressed LSAs.
Problem found and fix tested by Pierre-Yves Ritschard. OK norby@

Revision 1.33 / (download) - annotate - [select for diffs], Wed Aug 30 05:25:33 2006 UTC (17 years, 9 months ago) by norby
Branch: MAIN
CVS Tags: OPENBSD_4_0_BASE, OPENBSD_4_0
Changes since 1.32: +2 -4 lines
Diff to previous 1.32 (colored)

Remove useless logging, the logged event happens all the time, no need to
spam the logs.

ok claudio@ deraadt@

Revision 1.32 / (download) - annotate - [select for diffs], Mon May 29 16:50:36 2006 UTC (18 years ago) by claudio
Branch: MAIN
Changes since 1.31: +81 -15 lines
Diff to previous 1.31 (colored)

Delay lsa database deletes for MIN_LS_INTERVAL seconds so that flapping
routes do not cause a update storm. OK norby@

Revision 1.31 / (download) - annotate - [select for diffs], Tue Apr 25 08:06:32 2006 UTC (18 years, 1 month ago) by claudio
Branch: MAIN
Changes since 1.30: +2 -2 lines
Diff to previous 1.30 (colored)

The return value of lsa_num_links is an u_int16_t tnd not int. Found by lint.

Revision 1.30 / (download) - annotate - [select for diffs], Wed Mar 22 16:01:20 2006 UTC (18 years, 2 months ago) by claudio
Branch: MAIN
Changes since 1.29: +6 -9 lines
Diff to previous 1.29 (colored)

Move the AS external LSA tree out of struct ospfd_config. This simplifies
the code and makes config reloads easier. OK norby@

Revision 1.29 / (download) - annotate - [select for diffs], Mon Mar 13 09:36:06 2006 UTC (18 years, 3 months ago) by claudio
Branch: MAIN
Changes since 1.28: +7 -4 lines
Diff to previous 1.28 (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.28 / (download) - annotate - [select for diffs], Wed Mar 8 15:35:07 2006 UTC (18 years, 3 months ago) by claudio
Branch: MAIN
Changes since 1.27: +2 -2 lines
Diff to previous 1.27 (colored)

Spaces and other minor cleanup.

Revision 1.27 / (download) - annotate - [select for diffs], Thu Feb 23 16:16:27 2006 UTC (18 years, 3 months ago) by norby
Branch: MAIN
CVS Tags: OPENBSD_3_9_BASE, OPENBSD_3_9
Changes since 1.26: +5 -3 lines
Diff to previous 1.26 (colored)

Prevent ospfd from crashing when LSA Ext's are changed.

ok claudio@

Revision 1.26 / (download) - annotate - [select for diffs], Wed Feb 15 11:47:40 2006 UTC (18 years, 3 months ago) by norby
Branch: MAIN
Changes since 1.25: +3 -2 lines
Diff to previous 1.25 (colored)

Do not try to dirty an area when adding LSA ext.

OK henning@

Revision 1.25 / (download) - annotate - [select for diffs], Thu Feb 9 20:47:20 2006 UTC (18 years, 4 months ago) by norby
Branch: MAIN
Changes since 1.24: +8 -4 lines
Diff to previous 1.24 (colored)

Don't calculate all areas every time the link state database is updated,
only calculate the dirty ones.

ok claudio@

Revision 1.24 / (download) - annotate - [select for diffs], Thu Jan 5 15:10:57 2006 UTC (18 years, 5 months ago) by norby
Branch: MAIN
Changes since 1.23: +15 -5 lines
Diff to previous 1.23 (colored)

Improve how ospfd copes with time changes.

ok claudio@

Revision 1.23 / (download) - annotate - [select for diffs], Fri Nov 4 11:36:31 2005 UTC (18 years, 7 months ago) by claudio
Branch: MAIN
Changes since 1.22: +3 -3 lines
Diff to previous 1.22 (colored)

The maximal rate LSA can be updated is all MIN_LS_INTERVAL seconds and not
MIN_LS_ARRIVAL. MIN_LS_ARRIVAL is used to limit the rate of incomming updates.

Revision 1.22 / (download) - annotate - [select for diffs], Fri Nov 4 10:50:54 2005 UTC (18 years, 7 months ago) by claudio
Branch: MAIN
Changes since 1.21: +4 -2 lines
Diff to previous 1.21 (colored)

Set the vertex timestamp as soon as possible giving ospfd a chance to recover
from time jumps.

Revision 1.21 / (download) - annotate - [select for diffs], Wed Oct 12 09:08:25 2005 UTC (18 years, 8 months ago) by claudio
Branch: MAIN
Changes since 1.20: +6 -1 lines
Diff to previous 1.20 (colored)

In one special condition ospfd sent out ls updates without updating the
checksum. Because of the invalid checksum the other routers dropped it and
so the update was retransmitted over and over again. Now we update the
checksum in lsa_merge() after bumping the sequence number instead of
hoping that lsa_timeout() -> lsa_refresh() will do it for us.  OK norby@

Revision 1.20 / (download) - annotate - [select for diffs], Thu Oct 6 17:06:44 2005 UTC (18 years, 8 months ago) by claudio
Branch: MAIN
Changes since 1.19: +3 -1 lines
Diff to previous 1.19 (colored)

I should have read the RFC more carefully.
   ...if only one of the instances has its LS age field set to MaxAge
The important part is "only one", so check if both LSA are at MaxAge and
in that case return 0 -- the LSAs are identical.
This fixes a super nasty doom loop between two ospfd sending each other
LSA updates at an incredible speed. Tested and OK norby@

Revision 1.19 / (download) - annotate - [select for diffs], Mon Aug 8 12:22:48 2005 UTC (18 years, 10 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_3_8_BASE, OPENBSD_3_8
Changes since 1.18: +33 -7 lines
Diff to previous 1.18 (colored)

Try to do an SPF recalculation only if the LS DB changed.
This is still not perfect as on ABRs it is only necessary to
recalculate the area that got changed and not all others too.
More to come but it is a good start. OK norby@

Revision 1.18 / (download) - annotate - [select for diffs], Wed May 25 15:21:39 2005 UTC (19 years ago) by norby
Branch: MAIN
Changes since 1.17: +2 -2 lines
Diff to previous 1.17 (colored)

spelling

Revision 1.17 / (download) - annotate - [select for diffs], Wed May 25 08:06:57 2005 UTC (19 years ago) by david
Branch: MAIN
Changes since 1.16: +2 -2 lines
Diff to previous 1.16 (colored)

spelling

Revision 1.16 / (download) - annotate - [select for diffs], Tue May 24 20:54:33 2005 UTC (19 years ago) by claudio
Branch: MAIN
Changes since 1.15: +2 -1 lines
Diff to previous 1.15 (colored)

An lsa with age == MAX_AGE is always different and needs to be merged.
This solves a bug that made it impossible to remove a LSA by premature aging.
OK norby@

Revision 1.15 / (download) - annotate - [select for diffs], Tue May 24 07:13:00 2005 UTC (19 years ago) by claudio
Branch: MAIN
Changes since 1.14: +12 -4 lines
Diff to previous 1.14 (colored)

In lsa_merge() check if the LSA changed. If it did not change just free the
new one and use the old one. This will reduce the amount of updates sent.
OK norby@

Revision 1.14 / (download) - annotate - [select for diffs], Tue May 24 06:55:21 2005 UTC (19 years ago) by claudio
Branch: MAIN
Changes since 1.13: +27 -5 lines
Diff to previous 1.13 (colored)

Fix some obvious issues in the summary LSA origination.
Actually remove summary LSA if the LSA they refer to are no longer valid.
Set correct cost on the summary LSA.
Announce type 4 summary LSA.
OK norby@

Revision 1.13 / (download) - annotate - [select for diffs], Thu May 12 20:43:14 2005 UTC (19 years, 1 month ago) by claudio
Branch: MAIN
Changes since 1.12: +2 -2 lines
Diff to previous 1.12 (colored)

Every time a LSA is returned from a lookup lsa_age() it.
Also move the lsa_age() prototype to rde.h so that we can access it from
the SPF code.
OK norby@

Revision 1.12 / (download) - annotate - [select for diffs], Thu May 12 19:10:12 2005 UTC (19 years, 1 month ago) by norby
Branch: MAIN
Changes since 1.11: +38 -4 lines
Diff to previous 1.11 (colored)

Add "show database asbr/external/network/router/self-originate/summary"
to ospfctl.

Show detailed information about the LSAs in the Link State Database.

ok claudio@

Revision 1.11 / (download) - annotate - [select for diffs], Tue Apr 12 10:26:09 2005 UTC (19 years, 2 months ago) by deraadt
Branch: MAIN
Changes since 1.10: +2 -2 lines
Diff to previous 1.10 (colored)

spelling

Revision 1.10 / (download) - annotate - [select for diffs], Sun Feb 27 08:21:15 2005 UTC (19 years, 3 months ago) by norby
Branch: MAIN
CVS Tags: OPENBSD_3_7_BASE, OPENBSD_3_7
Changes since 1.9: +35 -3 lines
Diff to previous 1.9 (colored)

SPF and route table calculation.

Calculate Shortest Path Tree for each area known in the link state
database.

The Shortest Path Tree is used as input for route table calculation.
Route tabled is calculated and the result is inserted into the kernel
route table.

ok claudio@

Revision 1.9 / (download) - annotate - [select for diffs], Wed Feb 9 22:58:08 2005 UTC (19 years, 4 months ago) by claudio
Branch: MAIN
Changes since 1.8: +6 -5 lines
Diff to previous 1.8 (colored)

Fix premature ageing of self originating LSA. Still not perfect but better
than before where it just failed to work.

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

Use log_warnx() in lsa_check() to report bad LSA settings.

Revision 1.7 / (download) - annotate - [select for diffs], Wed Feb 9 20:40:23 2005 UTC (19 years, 4 months ago) by claudio
Branch: MAIN
Changes since 1.6: +34 -5 lines
Diff to previous 1.6 (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.6 / (download) - annotate - [select for diffs], Tue Feb 8 12:56:48 2005 UTC (19 years, 4 months ago) by claudio
Branch: MAIN
Changes since 1.5: +6 -2 lines
Diff to previous 1.5 (colored)

The LSA seq_num should be unsigned as it is expected by ntohl/htonl() even
though the seq_num needs to be compared as signed number.
No idea how IETF came up with such a stupid idea especially because the
seq_num is not allowed to wrap.
requested by henning@ OK henning@

Revision 1.5 / (download) - annotate - [select for diffs], Mon Feb 7 05:51:00 2005 UTC (19 years, 4 months ago) by david
Branch: MAIN
Changes since 1.4: +2 -2 lines
Diff to previous 1.4 (colored)

spelling fixes

Revision 1.4 / (download) - annotate - [select for diffs], Fri Feb 4 07:38:04 2005 UTC (19 years, 4 months ago) by claudio
Branch: MAIN
Changes since 1.3: +29 -23 lines
Diff to previous 1.3 (colored)

Add sanity checks for AS-external LSA. Refine some other checks to be as
strict as possible. OK norby@

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

excessive ()

Revision 1.2 / (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.1: +3 -3 lines
Diff to previous 1.1 (colored)

KNF

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.