summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ospfd/rde_spf.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Add point-to-point support for broadcast interfaces.remi2019-11-191-5/+10
| | | | | tested by Kapetanakis Giannis ok claudio@
* RFC 2328 mandates in 12.4.1.1 that the Link ID of the Type 3 link has toremi2019-04-041-2/+2
| | | | | | | | be set to the subnet's IP address and not the interface address. Bug report and fix from Mitchell Krome. OK claudio@
* Improve ABR support especially for self-originated stub networks.claudio2015-11-221-20/+25
| | | | | This seems to solve the last issues people reported when using ospfd in multiple areas. OK sthen@ prodding by deraadt@
* The if (!better && !equal) check is redundant as the same conditionbluhm2012-09-181-4/+1
| | | | | | is checked a few lines below again. Fewer checks make the code more readable. ok stsp@
* Both LSA_TYPE_AREA_OPAQ and LSA_TYPE_AS_OPAQ can be found when traversingclaudio2012-04-041-1/+7
| | | | | the LSDB. So adjust SPF calculation to not trigger a fatal. Problem found and fix tested by Chris Wopat
* Fix nexthop calculation for directly connected P2P links. connectedclaudio2011-05-241-25/+29
| | | | | may only be set on directly connected networks but not on router nodes which are used by the P2P links. Fix for PR 6597. OK sthen@
* First bits to support opaque LSA. Type-9, 10 and 11 are LSA that canclaudio2011-05-091-6/+6
| | | | | | | 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@
* More spring cleaningclaudio2011-05-021-14/+16
|
* Fix some memory leaks. Mainly better cleanup on shutdown but the v_nexthopclaudio2011-03-241-46/+15
| | | | | leak is a runtime one. OK bluhm@
* allow spf-delay and spf-holdtime to be specified in msec so ospfd candlg2010-02-161-3/+5
| | | | | | | better respond to rapid topology changes. developed while working with joshua atterbury ok claudio@ as part of a larger diff.
* get_rtr_link and get_net_link are not supposed to fail and returningclaudio2009-11-121-3/+3
| | | | | NULL would be bad. So instead use a fatalx() in that impossible case. After a discussion with deraadt@ because of a parfait warning.
* Full stub area support. This allows ABRs to announce a default networkclaudio2009-01-071-3/+4
| | | | | | summary LSA into stub areas so that these routers are able to reach the outside of the area. OK norby@
* Correct the output of several error and debug messages.norby2008-02-111-2/+2
|
* fix alot of whitespace problems...norby2007-10-011-3/+3
|
* Change the way nexthops are calculated on the root level. Instead of lookingclaudio2007-09-161-36/+34
| | | | | | | | from the target back and trying to figure the nexthop out, the link is searched in the interface list and the info from the matiching interface is used. This should solve the nexthop issues with setups having multiple point-to-point links between two routers as reported on misc@ some time ago. tested and OK norby@
* Fix two issues in the RIB calculation. First rt_nexthop_add() should notclaudio2007-08-061-5/+9
| | | | | | | | return from the inner loop if the outer loop is not finished -- just break the inner loop and continue the outside one. In rt_update() nexthops should not be cleared and freed if the new route is better. This resulted in reset RIB timers after any calculation run. Instead just mark the nexthop invalid and go on. Tested and OK pyr@
* add support for mapping route labels to AS-external route tags.reyk2007-06-191-9/+11
| | | | | manpage bits from jmc@ ok norby@ claudio@
* When calculating as_ext routes only respect the connected flag for rt_nodesclaudio2007-06-121-2/+2
| | | | | | with d_type DT_NET. Without this directly connected DT_RTRs use the wrong nexthop and fail to install the as_ext route because the nexthop is not directly reachable.
* Next step in equal cost multipath support. Make the SPF calculation multipathclaudio2007-04-101-143/+255
| | | | | | | 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@
* Use fatal() if calloc fails instead of fatalx().claudio2007-04-021-2/+2
|
* Remove useless debug message when calculating the SPF tree.norby2007-01-291-4/+2
| | | | ok claudio@
* Do not link from the LS DB to outside structures that may vanish beforeclaudio2007-01-291-3/+3
| | | | | | | | | 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@
* Remove most of the spf calculation related log_debug messages.claudio2007-01-241-13/+3
|
* In rt_invalidate() skip all as_ext routes if routes matching a specific areaclaudio2006-07-061-1/+6
| | | | | | are invalidated. as_ext routes have a uninitalised area id (aka 0.0.0.0) and so bad stuff happend when area 0.0.0.0 was invalidated. Because of this the FIB and RIB got out of sync in some scenarios.
* Correctly calculate point-to-point nexthop address. The logic was badly twistedclaudio2006-05-301-5/+6
| | | | | but funnily worked for routers with just one point-to-point link. Found by Marc Winiger. OK norby@
* kill unused old debug code.norby2006-04-251-49/+1
| | | | ok claudio@
* Move the AS external LSA tree out of struct ospfd_config. This simplifiesclaudio2006-03-221-2/+2
| | | | the code and makes config reloads easier. OK norby@
* Invalidating the full RIB and then only recalculating part of it is notclaudio2006-03-211-6/+18
| | | | | that smart. Kill the global rt_invalidate() instead clear only that part of the RIB that is actually recalculated. OK norby@
* The return value of the start/stop timer functions is almost never checked.claudio2006-03-131-11/+13
| | | | | | 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@
* Keep track of the uptime of the entries in the RIB.norby2006-02-241-1/+14
| | | | | | | It is now possible to see the uptime of the individual entries in the RIB. The uptime can be displayed with "ospfctl show rib" ok claudio@
* If ABR only look in the backbone area 0.0.0.0 for summary LSA. OK norby@claudio2006-02-101-4/+6
|
* Don't calculate all areas every time the link state database is updated,norby2006-02-091-6/+10
| | | | | | only calculate the dirty ones. ok claudio@
* zap cand_list_empty, found by lint.norby2006-02-021-7/+1
| | | | ok claudio@
* spf_calc should only do what the name says - calculate the spf tree.norby2006-02-011-13/+15
| | | | ok claudio@
* Wrong type, found by lint.norby2006-02-011-2/+2
| | | | ok claudio@
* variable naming, a -> addr.norby2006-02-011-6/+6
| | | | ok claudio@
* Separate route table calculations from the SPF calculation.norby2006-01-261-85/+90
| | | | ok claudio@
* Correct debug textnorby2006-01-241-2/+2
|
* Fix bad indent.norby2006-01-241-3/+2
|
* Split SPF calc and AS Ext calc.norby2006-01-241-62/+72
| | | | | | Initial diff by claudio@ reworked by me. test and ok claudio@
* Fixed version of r1.35, readd candidate to list in both cases so that the listclaudio2005-12-021-3/+8
| | | | remains sorted. Tested and OK norby@
* Revert candidate list change since it is broken.norby2005-11-141-7/+4
| | | | ok henning@
* spacing mostlyderaadt2005-11-121-9/+1
|
* The candidate list is a sorted linear list so when changing the cost ofclaudio2005-11-041-4/+7
| | | | | | a vertex that is already a candidate it is necessary to remove and insert the candidate otherwise the candidate list is no longer correctly sorted. OK norby@
* Kill spf_timer in struct ospfd_conf. There is no need for two event structsclaudio2005-11-041-4/+4
| | | | just use ev for the spf_timer -- ev is unused in the RDE.
* rt_lookup() did not respect the route node invalid flag and so AS-extclaudio2005-09-011-4/+12
| | | | | | | routes where not cleared even though the advertising router was no longer reachable. Same problem has the rt_dump() function that is used for ospfctl show rib. Tested by me and norby@ OK norby@ deraadt@
* Fix a bug in the nexthop calculation for complex networks. The result was aclaudio2005-08-301-13/+14
| | | | | | | routing table where most entries used the local interface IP as nexthop. This bug was found by jakob@ and he verified that it fixes his problems. Additional tests by me and norby@. OK norby@ deraadt@
* Try to do an SPF recalculation only if the LS DB changed.claudio2005-08-081-9/+9
| | | | | | 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@
* Correctly order LSA/route entries. Also prefer network vertices over routerclaudio2005-08-081-16/+51
| | | | | | ones in the candidate list. Be more careful about LS_INFINITY as it is possible that the cost overflows in the calculation (checking for == is in some cases wrong). Simplify the code a bit. Tested and OK norby@
* Mark connected routes (routes without a nexthop) in the rib. Without thisclaudio2005-06-271-10/+21
| | | | | as-ext routes would select a wrong nexthop if the forwarding router is directly connected. OK, help and debugging norby@