summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd/rde.c
AgeCommit message (Collapse)Author
2007-01-04Do not run rde_shutdown() unless bgpd is started with -d.Claudio Jeker
On some of my systems rde_shutdown() takes more than 3min doing nothing more than calling free(3) over and over again.
2006-12-12Kill peer_remove(). This function is only used once so inline it there.Claudio Jeker
OK henning@
2006-12-08no need for KAME_SCOPEID; just check __KAME__.Jun-ichiro itojun Hagino
2006-11-10char -> u_char in a few placesHenning Brauer
apparently from Jeff Rizzo <riz@NetBSD.org> via "Thomas E. Spanjaard" <tgen@netphreax.net>, ok claudio
2006-09-19when the neighbor announced the restart capability, send the end-of-ribHenning Brauer
marker after a bulk transfer, claudio ok
2006-08-23Extend show rib interface code so that it is possible to show the adj-rib-inClaudio Jeker
and adj-rib-out. Additionally it is now possible to limit the output to a specified peer. OK henning@
2006-08-22do not send the empty UPDATE message as End-of-RIB marker yet, JuniperHenning Brauer
doesn't handle it correctly. found out the hard way by me :( Note: This is a clear protocol violation by juniper. Nontheless we need to be interoperate correctly...
2006-08-14after a bulk transfer (initial or caused by route refresh request),Henning Brauer
send an "empty" UPDATE message, used as End-of-RIB marker for implementions understanding this, ignored by anything else. see draft-ietf-idr-restart-13.txt, ok claudio
2006-06-15Instead of passing three different kinds of arguments in show rib controlClaudio Jeker
request use one struct ctl_show_rib_request where all the info is encoded. OK henning@
2006-06-14Send bot nexthops (exit and true) in the bgpctl show rib cases. bgpctlClaudio Jeker
can than select which nexthop should be printed. OK henning@
2006-05-28Preload and pin nexthop used in filtersets so the are validiated when used.Claudio Jeker
This will fix problems with set nexthop on outgoing filters. Found by gluk@ OK henning@
2006-04-21attr_init() should use attrhashsize and not pathhashsize. Found via a lintClaudio Jeker
cleanup diff from deraadt@.
2006-04-12It is no longer allowed to change attributes in place. This corrupts theClaudio Jeker
attribute cache. Instead remove attribute and readd it after beeing changed. This should fix the "att_diff: equal attributes encountered" error seen by Tony Sarendal. OK henning@
2006-04-05remote_bgpid is stored in host byte order so a htonl() is needed when puttingClaudio Jeker
the value on the wire. This solves the backward originator-ids seend by Tony Sarendal. OK henning@
2006-03-22Add a new SHOW imsg to send optional attributes to bgpctl. This can be usedClaudio Jeker
to show communites in bgpctl output. Only send these messages if it they are requested to reduce the overhead for simple listings. Looks good henning@
2006-03-13Fix for PR 5052. Be more careful about the announced networks we accept.Claudio Jeker
Make sure that at least the address family and the prefix length are sane. Reported and fix tested by Pete Vickers.
2006-02-10Make it possible to turn suftreconfig in/out on or off. Default is on forClaudio Jeker
both directions. Manpage update follows. OK henning@
2006-02-02Implement new special community "neighbor-as". neighbor-as is expanded onClaudio Jeker
the fly to the remote AS of the current neighbor. This can be used to simplify rulesets in a dramatic way -- going from a script based nightmare down to a handfull rules. jajajaja henning@
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