summaryrefslogtreecommitdiff
path: root/usr.sbin/ospfd/rde.c
AgeCommit message (Collapse)Author
2007-02-12rde_nbr_loading() may be called with area == NULL. Check for this conditionClaudio Jeker
and scan all available areas in that case -- the only case when this may happen is for self announced AS-ext LSA. This solves a crash when redistributed routes were removed shortly after startup. OK norby@
2007-02-09Remove unneeded statement. The debug code needing it is long gone.Claudio Jeker
2007-02-01whitespace cleanup, no binary change.Claudio Jeker
2007-02-01Preliminary configuration reload support. Seems to work reasonably wellClaudio Jeker
after fixing many use-after-free errors a couple of days ago. Most cases -- adding/removing of interfaces, adding/removing of areas -- seem to work. Still merge_config() is a behemoth of a function and some edge cases may not be covered correctly (yet). OK norby@ pyr@
2007-02-01There is no need to check if the LSA is matched by an net LSA inClaudio Jeker
rde_asext_put(). Just try to remove the as-ext LSA, if the prefix is announced as stub net LSA lsa_find() will fail later and nothing will happen. OK norby@ pyr@
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 some log_debug()s that are no longer needed.Claudio Jeker
2007-01-20Ignore SIGPIPE in the parent and RDE as well.Claudio Jeker
2007-01-11Silently ignore unknown neighbors in the rde and ospfe imsg handler. ThisClaudio Jeker
is needed for upcomming reload support -- it can happen that a message to a just deleted neighbor is still pending.
2007-01-11Remove unneeded config stuff when booting up the RDE. This makes the reloadClaudio Jeker
handling a bit easier.
2006-12-21order variables by size/type.Claudio Jeker
2006-12-08Fix a crash seen on busy area border routers. The problem was a NULLClaudio Jeker
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@
2006-12-07Make it possible to set the metric and LSA type for redistributed routes.Claudio Jeker
Mostly based on a diff by Pierre-Yves Ritschard (I just simplified the parser code). OK norby@
2006-06-28Track the uptime of the ospfd daemon itself.Esben Norby
It is possible to read the uptime of the daemon with the "ospfctl show" command. ok claudio@
2006-05-30Now that rtlabels are accessable via sysctl we can use route lables toClaudio Jeker
define which routes should be redistributed via OSPF. So now you can define the export list on a fine graded basis. More to come... OK norby@
2006-05-29Delay lsa database deletes for MIN_LS_INTERVAL seconds so that flappingClaudio Jeker
routes do not cause a update storm. OK norby@
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-09More spring cleaning with lint. Change a few types and add some comments toClaudio Jeker
help lint.
2006-03-08Remove unused quit flag inherited from bgpd long ago.Claudio Jeker
2006-03-08Fix logic of the kroute code. First of all there was a porblem if a prefixClaudio Jeker
is known via kernel and ospf. If the kernel route is removed the ospf one was not added to the FIB. This is an uncommon event so it is OK to request an update from the RIB in this case. Additionally ospfd treated bgpd inserted routes like static routes. This is wrong because IGP routes habe a higher preference over EGP routes. In this case a bgpd route needs to be overridden by a ospfd one. With these to fixes bgpd and ospfd start to play nicely together. OK norby@
2006-02-21Better English in comments.Claudio Jeker
2006-02-10ospfd does not need fd passing via the imsg framework so remove that codeClaudio Jeker
and remove other unneeded functions that are only used in bgpd.
2006-02-10If ABR only look in the backbone area 0.0.0.0 for summary LSA. OK norby@Claudio Jeker
2006-01-12Rewrite the redistribute code. The previous implementation was stupid andClaudio Jeker
resulted in a major bottleneck if bgpd was used on the same box -- not clever to do linear searches over 175k entries :(. This now moves the redistribute code back into kroute duty and kills the linear list. Also default routes are now redistributed without the need for a kernel default route. OK norby@
2006-01-05Improve how ospfd copes with time changes.Esben Norby
ok claudio@
2005-12-29More correct cleanup on exit. OK norby@Claudio Jeker
2005-12-05Optimize rde_redistribute() a bit and remove two unneeded and way to verboseClaudio Jeker
log_debug() messages. 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-11-04Use >= instead of == to compare cost with LS_INFINITY. While there fix a typo.Claudio Jeker
2005-10-19fix some spellings in comments.Claudio Jeker
2005-10-12Fix the flooding procedure. Violate the RFC else many BAD_LS_REQ events andClaudio Jeker
session drops happend while booting up. If a router is conected to a other router over two different interface one session will be unable to load until the other one is in state FULL. ospfd no longer issues a BAD_LS_REQ event if the LSA is equal to the one in table but if the sent lsa is older a BAD_LS_REQ event is still issued. OK norby@
2005-10-12Fix a massive memory leak in the RDE. ospfd leaked every ls update unlessClaudio Jeker
lsa_add() was called (which is just one specific case of many) OK norby@
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-05-26Remove unneeded debugging messages from rde imsg handling.Esben Norby
2005-05-26Support dumping the configuration the way bgpd(8) does it.Esben Norby
This makes it possible to have ospfd(8) parse a configuration file and display the parsed result. ok claudio@
2005-05-25spellingEsben Norby
2005-05-25spellingDavid Krause
2005-05-24Only redistribute networks if the interface they depend on is actuallyClaudio Jeker
up and running. This makes redistribution of carp(4)-ed networks magically work. OK norby@
2005-05-24Fix format string.Claudio Jeker
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-23useless use of endpwentHenning Brauer
2005-05-22The Route Information Base for AS-External should only be dumped once.Esben Norby
ok claudio@
2005-05-12Add "show database asbr/external/network/router/self-originate/summary"Esben Norby
to ospfctl. Show detailed information about the LSAs in the Link State Database. ok claudio@
2005-05-11Add some newlines to make the code easier to follow. No functional change.Claudio Jeker
2005-05-09Force all as-external routes to point to the router announcing them byClaudio Jeker
setting the forward address to 0.0.0.0. This is needed as we currently fail to check if the real nexthop is covered by an ospf route -- uncovered routes are ignored by the other routers. OK norby@ tested and requested by Philip Olsson
2005-05-08Keep track of the req list in the RDE. The RFC requires us to check forClaudio Jeker
silly updates while fetching the table from the other server. OK norby@
2005-05-02use setres[ug]id for privilege dropping; ok norby@Damien Miller
2005-04-12Support for self originated AS-external LSA.Claudio Jeker
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@
2005-04-06When deleting LSA because they hit max age (IMSG_LS_MAXAGE) check if theClaudio Jeker
current LSA in the database was updated while max age LSA was flooded out. This solves a reace condition where self originated LSA got removed because an other server sent an update with age set to MAXAGE. OK norby@