summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd
AgeCommit message (Collapse)Author
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-10The attributes cache broke the set community filterset because community_set()Claudio Jeker
modified the attribute data directly and corrupted the cache by doing it. It is no longer allowed to modify attributes via attr_optget() -> change attr->data. Instead remove the old attribute from the aspath and then add a new modifed one again. Included in this change is the removal of a "feature" that allowed only one community per AS. If you had problems to add multiple communities via filters then this was the problem. Looks good Henning.
2006-01-10In attr_diff() compare the attributes flags too. They may be different andClaudio Jeker
especially they are accounted in the hash. While there change a 0 to NULL.
2006-01-09Ups. Inverse logic.Claudio Jeker
2006-01-07Add COMMUNITY_NO_PEER to the list of known wellknown communities else itClaudio Jeker
is not possible to use NO_PEER as community in the config.
2006-01-05Kill ENSURE(), remove ensure.h, say bye bye to fatal_ensure() andClaudio Jeker
one hip hip hooray from 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-04Fix a mem leak of the unusual kind. In some cases a new aspath was addedClaudio Jeker
to the RIB without checking if there was a equal path already available. Modify path_update() so that we do not link a new aspath without calling path_lookup() before to check if the aspath is not already in the RIB. Found via bgpctl show rib mem. OK 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-04If the decision process is turned of but a prefix is still active decrease theClaudio Jeker
active prefix counter.
2006-01-04Correctly count the number of allocated BGP attributes. Needs a own counter.Claudio Jeker
2006-01-03Track some (memory) statistics in the RDE. Accessible via bgpctl.Claudio Jeker
2006-01-03Move functions shared with bgpctl into new file util.c. Simplifies theClaudio Jeker
link between bgpctl and bgpd mostly because of rde_attr.c.
2006-01-03Plug some mem leaks.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-03Move the signal handler flags check between the poll() call and the pollClaudio Jeker
fd handling. Do not access poll fd in case of an error or timeout. With and OK dlg@
2006-01-03No need to check the poll fds in case of EINTR. OK dlg@Claudio Jeker
2005-12-30There is no attr_mp_nexthop() function, remove the prototype.Claudio Jeker
2005-12-30Remove unused attr_optlen()Claudio Jeker
2005-12-30Use sys/hash.h instead of own built functions that work similar.Claudio Jeker
While there reorder some structs to help with alignment.
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-24bzero the pfd array before setting it up and calling poll because on errorClaudio Jeker
(e.g. EINTR) poll() will not update the pfd array (copyout) and so the old revents are used and results in a blocking parent process. OK dlg@
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-19Better English in comment.Claudio Jeker
2005-12-14Replace strlcpy() with memcpy() in the sockaddr_dl handling. sdl_data isClaudio Jeker
not a C string and strlcpy() only works on C strings -- returns length of the source. Found by tedu@ OK deraadt@ tedu@
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 #include <limits.h>Claudio Jeker
2005-12-08Missing ntohs() in error path. Found via regress test.Claudio Jeker
2005-12-08When parsing open messages enforce that the optional parameter length isClaudio Jeker
equal to the size of the rest of the message and not only enforcing that no overflow happens. Found via regress test. OK henning@
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-29superfluous ; OK henning@Claudio Jeker
2005-11-02Mark some additional function arguments as const.Claudio Jeker
2005-11-02Reorder and comment reconfigure(). Makes more sense so.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-02Implement filterset_equal() and rde_filter_equal(). Both return 1 ifClaudio Jeker
the two passed filter(set)s are equal or 0 otherwise. rde_filter_equal() has an additional argument dir to specify which direction should be considered.
2005-11-01Sort filter_set with equal type as well. This affects communityClaudio Jeker
attributes and set nexthop. Now the full filter set list is sorted.
2005-11-01Relative metrics should be stored in relative and not metric. The oneClaudio Jeker
is singed the other not.
2005-11-01Make sure, that the list of filter_sets is ordered. Makes comparing easier.Claudio Jeker
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-31Missing space in printf for unknown peers.Claudio Jeker
2005-10-31Print group names in rules in double quotes. Makes the output more parsable.Claudio Jeker
2005-10-19for "bgpctl neighbor foo up/down/clear", make bgpctl not exit after sendingHenning Brauer
the request, but wait for the new IMSG_CTL_RESULT message, which contains a status code to indicate wether the request was processed successfully or wether an error occured and if so what kind of error. no more "IMSG_CTL_NEIGHBOR_ with unknown neighbor foobaz" in the log when you mistyped foobar - no bgpctl itself complains claudio ok
2005-10-19tsc tsc tsc, tabs are not always holyHenning Brauer
2005-10-19new keyword "down" in neighbor spec, when givenm, the session is notHenning Brauer
started on bgpd startup but stays in IDLE. requested by claudio
2005-10-19on "bgpctl neighbor foo clear", we used to send a STOP event immediatelyHenning Brauer
followed by a START event. Instead of sending START immediately, start the IdleHoldTimer with a very low value (5 seconds) so that we restart the session these seconds later. some other implementations deal poorly with our previously superfast reconnects, namely, that commercial one from san jose, claudio ok