summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd/rde.c
AgeCommit message (Collapse)Author
2006-01-24Last bits for softreconfig in support. Now bgpd will automaticaly rei-filterClaudio Jeker
the RIB after a reload so you no longer need to clear sessions because you modified filters. Looks good henning@.
2006-01-24Check if filter changed on a per peer basis. This should speed up theClaudio Jeker
table run done later as many filter evaluations can be skipped. From the softreconfig in tree. Looks good henning@
2006-01-24Finally start using the Adj-RIB-In. The most complex part is the modificationClaudio Jeker
of path_update(). There are about 10 different ways how to update a path and some of them are tricky. Looks good henning@
2006-01-20Proactively fix prefix counters. Currently only F_LOCAL prefixes exist butClaudio Jeker
as soon as F_ORIGINAL come the counters would no longer be correct and in the end max-prefix would no longer work. Add additinal counters for F_ORIGINAL prefixes and bump the correct conter depending on the prefix flags. OK henning@
2006-01-20Don't leak a aspath in network_add(). path_update() copies the aspath soClaudio Jeker
the passed aspath needs to be freed in network_add(). OK henning@
2006-01-14Small step in supporting the Adj-RIB-In additionaly to the Local-RIB.Claudio Jeker
First step is to define two flags F_LOCAL and F_ORIGINAL. These flags are used to distinguish prefix in the Local-RIB and those in the Adj- RIB-In. Adapt prefix API and add additional checks so that no Adj-RIB- In prefixes get mistakenly selected. Currently no F_ORIGINAL prefixes are created but this may change soon. Looks good Henning.
2006-01-13Simplify evaluation process. Instead of checking the reachability of a prefixClaudio Jeker
at many different places do it once. This simplifies the logic and makes it easier to extend it for upcomming Adj-RIB-In addition. OK Henning.
2006-01-12Copy AS path in rde_filter() on demand instead of doing it before callingClaudio Jeker
rde_filter(). Adapt path_update() to this change too. path_update() does a path_copy before linking the rde_aspath into the RIB. Looks good Henning.
2006-01-05Cache optional BGP attributes (mostly communities) and use a simpleClaudio Jeker
pointer plus a ref counter to link the attributes to the path object. Saves +/- 10M on 11 full feeds. Looks good Henning
2006-01-04Simplify shutdown function and sprinkle some rde_quit checks into functionsClaudio Jeker
that don't need to run if the RDE is quitting e.g. the decision process.
2006-01-03Track some (memory) statistics in the RDE. Accessible via bgpctl.Claudio Jeker
2006-01-03Kill WFLAG macro. Should have been included in the rde_attr_parse() merge.Claudio Jeker
Makes the code more obvious.
2006-01-03No need to check the poll fds in case of EINTR. OK dlg@Claudio Jeker
2005-12-30Merge rde_attr_error() into rde_attr_parse() it is no longer necessary toClaudio Jeker
have a separate error function. It is no porblem to call rde_update_err() directly.
2005-12-24Don't use bzero(&pfd, sizeof(pfd)); pfd is an array so bzero(pfd, sizeof(pfd));Claudio Jeker
is better. Discussed on icb.
2005-12-09Unkown attributes need to be optional, if not issue a "unknown wellknownClaudio Jeker
attribute" error. While this check is already present in the error handling function it is not done while parsing. Found via regress, OK henning@
2005-12-08Missing ntohs() in error path. Found via regress test.Claudio Jeker
2005-11-30No need to filter incoming withdraws just try to remove everything form theClaudio Jeker
RIB -- if it got filtered before so be it.
2005-11-29Add a flags field to struct prefix which will be used shortly. Remove the peerClaudio Jeker
pointer so that the size does not grow. Adding 4 bytes to struct prefix would result in 64MB more memory usage on one of my systems.
2005-11-29even more spaces and tabs.Claudio Jeker
2005-11-02Use the new rde_filter_equal() with dir = DIR_OUT to check if a soft-Claudio Jeker
reconfigure out run is needed or not. If the output filters did not change no table walk is needed.
2005-11-01Softreconfig out support. On config reload filter changes of outgoing rulesClaudio Jeker
will propagte directly to the neighbors. There is no need to restart bgpd in that case. Currently not optimal but a good start. "get it in" henning@
2005-11-01Major cleanup in rde_update.c. Merge equal code used in different placesClaudio Jeker
into own functions. Move up_dump_upcall() into rde.c and rename it rde_up_dump_upcall(). This is needed for the next step. up_test_update() tests if an update or withdraw is needed and up_generate() creates the updates. "get it in" henning@ (he is eager on softreconfig out)
2005-11-01Switch from the per peer filter set list to a filter-only solution.Claudio Jeker
The default filter_sets are converted into match filter rules that get evaluated first. Simplifies code massively -- mainly the config reload part -- and makes softreconfig out a piece of cake. "get it in" henning@
2005-10-13Simplify poll loop, there is no need for nfds tracking. While there killClaudio Jeker
some comments that are totaly wrong. OK henning@
2005-09-21Make sure that "updates" with only MP withdraws (MP_UNREACH_NRLI) stopClaudio Jeker
processing after the MP withdraw block. OK henning@
2005-09-20allow "show rib" to be limited to an address family tooHenning Brauer
2005-09-20let "bgpctl network show" print v6 addresses correctlyHenning Brauer
2005-09-19KNFHenning Brauer
2005-08-10Pass the correct peer to rde_apply_set(). rde_apply_set() needs to knowClaudio Jeker
the peer where the prefix came from so that prepend-neighbor works. Extend rde_filter() and make sure that the correct peer is passed. Until now most cases resulted in a NULL peer causing a nasty crash that was found by David Ulevitch. OK henning@
2005-07-29Debugging session at WTH. Fix many bugs in the IPv6 support -- some copy pasteClaudio Jeker
and some more obscure ones. With this is it possible to run IPv6 sessions between two bgpd. OK if it does not break IPv4 hummpa barman Henning
2005-07-29Add another piece to the IPv6 puzzle. This time code to generate MP updates.Claudio Jeker
Does not affect IPv4 minimaly tested for IPv6 because we still don't have an IPv6 capable neighbor. henning@ ya
2005-07-01Switch filter_sets form SIMPLEQ to TAILQ, needed for upcomming stuff.Claudio Jeker
2005-07-01The newly introduced function filterset_free() existed already asClaudio Jeker
rde_free_set(), I just missed it when I was looking for it. Kill rde_free_set() and use the more correct filterset_free() from now on.
2005-07-01Make the pftable filter set use the name2id "cache" like the route labels.Claudio Jeker
This saves 14 bytes per aspath. OK henning@
2005-06-29rtlabel support via filter sets. Just use "set rtlabel foobar" in filtersClaudio Jeker
network and neighbor statements and the routes are labeled accordingly. While doing that fix some mem-leaks by introducing filterset_free() and remove the free on send option of send_filterset(). This took a bit longer because we need to carefully track the rtlabel id refcnts or bad things may happen on reloads. henning@ looks fine
2005-06-13route label support, kroute part and ID allocator as well as the internalHenning Brauer
interface changes. support in the filter language and rde to come. claudio ok
2005-06-10Simplify show rib upcalls. Kill one mostly unused function.Claudio Jeker
2005-05-23no need for endpwent()Henning Brauer
(you lost, theo)
2005-05-03setres[ug]id; ok claudio@Damien Miller
2005-04-28Support for "network connected" and "network static" -- announce allClaudio Jeker
directly connected respectively all static routes. The list is auto- matically adjusted as soon as a route changes. OK henning@
2005-04-16Format string cleanup. OK millert, henning, claudioChad Loder
2005-03-28ewps, this was not supposed to creep inHenning Brauer
2005-03-28free rules_l if the initial config file parse failsHenning Brauer
2005-03-24soem fatal()s that should be fatalx()s, Alexander von GernlerHenning Brauer
2004-11-23Switch from a single filter_set to a linked list of sets. With this changeClaudio Jeker
it is possible to specify multiple communities. This is also the first step to better bgpd filters. OK henning@
2004-11-19For consistency reasons rename struct as_filter to struct filter_as.Claudio Jeker
OK henning@
2004-11-11Unbreak peer_localaddr() because Link Local Addresses reported byClaudio Jeker
getifaddrs() have the scope id added to the address and so fuck up in the compare later. This part has bin stolen from ifconfig/ifconfig.c and shows the beauty of IPv6. Thank you KAME. disgusting but OK henning@
2004-11-11Pass the copied as-path attributes to the filter function and not theClaudio Jeker
original. Affected code is currently still unreachable.
2004-11-11spaces at EOL in comments, spotted by theoHenning Brauer