summaryrefslogtreecommitdiff
path: root/usr.sbin/ospfd/rde_spf.c
AgeCommit message (Collapse)Author
2012-09-18The if (!better && !equal) check is redundant as the same conditionAlexander Bluhm
is checked a few lines below again. Fewer checks make the code more readable. ok stsp@
2012-04-04Both LSA_TYPE_AREA_OPAQ and LSA_TYPE_AS_OPAQ can be found when traversingClaudio Jeker
the LSDB. So adjust SPF calculation to not trigger a fatal. Problem found and fix tested by Chris Wopat
2011-05-24Fix nexthop calculation for directly connected P2P links. connectedClaudio Jeker
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@
2011-05-09First bits to support opaque LSA. Type-9, 10 and 11 are LSA that canClaudio Jeker
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@
2011-05-02More spring cleaningClaudio Jeker
2011-03-24Fix some memory leaks. Mainly better cleanup on shutdown but the v_nexthopClaudio Jeker
leak is a runtime one. OK bluhm@
2010-02-16allow spf-delay and spf-holdtime to be specified in msec so ospfd canDavid Gwynne
better respond to rapid topology changes. developed while working with joshua atterbury ok claudio@ as part of a larger diff.
2009-11-12get_rtr_link and get_net_link are not supposed to fail and returningClaudio Jeker
NULL would be bad. So instead use a fatalx() in that impossible case. After a discussion with deraadt@ because of a parfait warning.
2009-01-07Full stub area support. This allows ABRs to announce a default networkClaudio Jeker
summary LSA into stub areas so that these routers are able to reach the outside of the area. OK norby@
2008-02-11Correct the output of several error and debug messages.Esben Norby
2007-10-01fix alot of whitespace problems...Esben Norby
2007-09-16Change the way nexthops are calculated on the root level. Instead of lookingClaudio Jeker
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@
2007-08-06Fix two issues in the RIB calculation. First rt_nexthop_add() should notClaudio Jeker
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@
2007-06-19add support for mapping route labels to AS-external route tags.Reyk Floeter
manpage bits from jmc@ ok norby@ claudio@
2007-06-12When calculating as_ext routes only respect the connected flag for rt_nodesClaudio Jeker
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.
2007-04-10Next step in equal cost multipath support. Make the SPF calculation multipathClaudio Jeker
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@
2007-04-02Use fatal() if calloc fails instead of fatalx().Claudio Jeker
2007-01-29Remove useless debug message when calculating the SPF tree.Esben Norby
ok claudio@
2007-01-29Do not link from the LS DB to outside structures that may vanish beforeClaudio Jeker
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@
2007-01-24Remove most of the spf calculation related log_debug messages.Claudio Jeker
2006-07-06In rt_invalidate() skip all as_ext routes if routes matching a specific areaClaudio Jeker
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.
2006-05-30Correctly calculate point-to-point nexthop address. The logic was badly twistedClaudio Jeker
but funnily worked for routers with just one point-to-point link. Found by Marc Winiger. OK norby@
2006-04-25kill unused old debug code.Esben Norby
ok claudio@
2006-03-22Move the AS external LSA tree out of struct ospfd_config. This simplifiesClaudio Jeker
the code and makes config reloads easier. OK norby@
2006-03-21Invalidating the full RIB and then only recalculating part of it is notClaudio Jeker
that smart. Kill the global rt_invalidate() instead clear only that part of the RIB that is actually recalculated. OK norby@
2006-03-13The return value of the start/stop timer functions is almost never checked.Claudio Jeker
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@
2006-02-24Keep track of the uptime of the entries in the RIB.Esben Norby
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@
2006-02-10If ABR only look in the backbone area 0.0.0.0 for summary LSA. OK norby@Claudio Jeker
2006-02-09Don't calculate all areas every time the link state database is updated,Esben Norby
only calculate the dirty ones. ok claudio@
2006-02-02zap cand_list_empty, found by lint.Esben Norby
ok claudio@
2006-02-01spf_calc should only do what the name says - calculate the spf tree.Esben Norby
ok claudio@
2006-02-01Wrong type, found by lint.Esben Norby
ok claudio@
2006-02-01variable naming, a -> addr.Esben Norby
ok claudio@
2006-01-26Separate route table calculations from the SPF calculation.Esben Norby
ok claudio@
2006-01-24Correct debug textEsben Norby
2006-01-24Fix bad indent.Esben Norby
2006-01-24Split SPF calc and AS Ext calc.Esben Norby
Initial diff by claudio@ reworked by me. test and ok claudio@
2005-12-02Fixed version of r1.35, readd candidate to list in both cases so that the listClaudio Jeker
remains sorted. Tested and OK norby@
2005-11-14Revert candidate list change since it is broken.Esben Norby
ok henning@
2005-11-12spacing mostlyTheo de Raadt
2005-11-04The candidate list is a sorted linear list so when changing the cost ofClaudio Jeker
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@
2005-11-04Kill spf_timer in struct ospfd_conf. There is no need for two event structsClaudio Jeker
just use ev for the spf_timer -- ev is unused in the RDE.
2005-09-01rt_lookup() did not respect the route node invalid flag and so AS-extClaudio Jeker
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@
2005-08-30Fix a bug in the nexthop calculation for complex networks. The result was aClaudio Jeker
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@
2005-08-08Try to do an SPF recalculation only if the LS DB changed.Claudio Jeker
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@
2005-08-08Correctly order LSA/route entries. Also prefer network vertices over routerClaudio Jeker
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@
2005-06-27Mark connected routes (routes without a nexthop) in the rib. Without thisClaudio Jeker
as-ext routes would select a wrong nexthop if the forwarding router is directly connected. OK, help and debugging norby@
2005-06-27Don't let /32 DT_NET routes override DT_RTR routes. This should helpClaudio Jeker
setups with /32 loopback networks. OK norby@
2005-06-26typo by claudioTheo de Raadt
2005-06-26Don't htonl() something that is already in network byte order. AS-Ext routesClaudio Jeker
suffered because of this. Normaly seen because they where not added to the rib or ended up with a bad nexthop. This is what you get for stealing code from bgpd :( OK norby@