summaryrefslogtreecommitdiff
path: root/usr.sbin/ospfd/rde_spf.c
AgeCommit message (Collapse)Author
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@
2005-05-28Fix confusing typo.Esben Norby
2005-05-27While calculating the routing table don't ignore all routes with a cost ofClaudio Jeker
LS_INFINITY. Summary LSA are not touched by the SPF algorithm and so they got dropped here because the still had a cost of LS_INFINITY. The calculated routing table starts to make sense now. OK norby@
2005-05-27Only checking if w->cost is non equal to LS_INFINITY and w->prev is NULL isClaudio Jeker
not enough to distinguish between calculated vertexes and those just queued in the candidate list. So add a additional check if the vertex is on the candidate list. This fixes a problem Stephen Marley reported some time ago. OK norby@
2005-05-27Fix nexthop calculation by setting w->prev before calling calc_next_hop().Claudio Jeker
OK norby@
2005-05-26Remove annoying spf_calc debug line.Esben Norby
2005-05-26Remove route update debugging messages.Esben Norby
2005-05-26Disable cand_list_dump and spf_dump by default.Esben Norby
2005-05-26Unwanted.Esben Norby
2005-05-24Fix some obvious issues in the summary LSA origination.Claudio Jeker
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@
2005-05-23First part of summary LSA origination. Not perfect but a start.Claudio Jeker
OK norby@
2005-05-23Kill rt_dump_debug stuff as "ospfctl show rib [detail]" provides the sameEsben Norby
information. ok claudio@
2005-05-22Handle cost2 for AS-external, and prepare for handling flags inEsben Norby
ospfctl show rib detail. ok claudio@
2005-05-12Calculate routes for summary and as-external LSA. Still some minor partsClaudio Jeker
missing but good enough to be used. Tested and some input by Stephen Marley. OK norby@
2005-05-12lsa_age() the vertex befor comparing the age with MAX_AGE.Claudio Jeker
Move a common check (cost == LS_INFINITY) out of the switch cases. OK norby@
2005-05-12Don't fatal in case no root node was found for spf calculation.Claudio Jeker
The area may be empty because there is no active interface. OK norby@
2005-05-05Fix a stupid typo in the #if 0 block in spf_calc() and start using that codeClaudio Jeker
block. The idea is to ignore nodes that are already part of the SPF tree as soon as possible. OK norby@
2005-03-23prefixlen2mask() should return a network byte order result as it does implyClaudio Jeker
by using an in_addr_t as return type. It simplyfies also the usage as in most cases the mask is used with a struct in_addr address which is also network byte order. Add prototypes of prefixlen2mask() and mask2prefixlen() to ospfd.h as it is used or will be used at different places. OK norby@
2005-03-22Remove bool cruft.Esben Norby
ok claudio@
2005-03-17Fix an access after free. It is not allowed to use a RB_REMOVE inside of aClaudio Jeker
RB_FOREACH. OK norby@ deraadt@
2005-03-14Add "show summary" to ospfctl.Esben Norby
ok claudio@ henning@
2005-03-12Add "show rib" and "show rib detail" to ospfctl.Esben Norby
ok henning@
2005-03-12Small K&F.Esben Norby
ok henning@
2005-03-08Remove no longer valid route entries.Esben Norby
ok claudio@