summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd/rde.h
AgeCommit message (Collapse)Author
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-05-28Even better nexthop delete behaviour. Do not delete nexthop if they are usedClaudio Jeker
by filter sets or if the nexthop is currently looked up. With this the "nexthop_update: non-existent nexthop" warning should be history. 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-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-04-04add "set nexthop self", force nexthop to be set to own address even with IBGPHenning Brauer
requested & tested Falk Brockerhoff <fb@smartterra.de>, and tony sarendal tested this too. claudio ok
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-02-09Implement "set community delete 65001:*" and friends. This will removeClaudio Jeker
communities from the path attributes. Useful to make sure that the ones you set later are set by a (evil) peer. 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-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-20Pass flags to prefix_move() so that a prefix that has both F_ORIGINAL andClaudio Jeker
F_LOCAL set can be moved correctly. This is more like a add as we have one prefix more afterwards. Looks good 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-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-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-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.
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-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-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-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-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-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-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-10Introduce attr_optlen() to get the total lenght of an optional attributeClaudio Jeker
plus header. Soon needed.
2005-04-12Introduce a per prefix weight. The weight is used to tip prefixes with equalClaudio Jeker
long AS pathes in one or the other direction. It weights a prefix at a very late stage in the decision process. This is a nice bgpd feature to traffic engineer networks where most AS pathes are equally long. OK henning@
2005-03-11Finally commit the transparent-as and nexthop no-modify stuff I wrote on theClaudio Jeker
way to FOSDEM. With transparent-as set to ye bgpd will not prepend his own AS for sent updates. NB the neighbor needs to set "enforce neighbor-as no" or it will not like the received AS paths. With set nexthop no-modify bgpd will change the nexthop as done normaly. OK henning@ man page update with help of jmc@
2004-12-23sort structs for most optimal alignment, help mickey, claudio okHenning 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-11Store the local v4 and v6 address of a session. For IPv4 sessions the firstClaudio Jeker
IPv6 address with global scope of the interface used by the session is used. In any case the local endpoint of the session is used for one of the two no matter what scope. OK henning@
2004-11-11New config statement "rde route-age [evaluate|ignore]". If set to evaluateClaudio Jeker
the best path selection will not only be based on the path attributes but also on the age of the prefix. This is an extension to the RFC. The default is ignore but previously it was implicitly set to evaluate. OK henning@ man page OK jaredy@ jmc@
2004-11-10Remove no longer needed code. OK henning@Claudio Jeker
2004-09-28gcc-ism. We don't want it, we don't need it.Claudio Jeker
OK henning@ noticed by deraadt@
2004-09-28Add prepend-neighbor feature. Prepend the remote-as n times similar toClaudio Jeker
prepend-self. Only for incomming UPDATEs. OK henning@
2004-08-13Fix minor issues with IPv6 dumps and add a function for dumping the RIB tableClaudio Jeker
protocol independent. This new dump format is not (yet) supported by the mrtd route_btoa tool. OK henning@
2004-08-12Just ignore RFC2545 and the silly idea of using link local addresses asClaudio Jeker
nexthop. This makes the code a lot simpler. OK henning@
2004-08-10switch nexthop in struct filter_set form struct in_addr to struct bgpd_addrClaudio Jeker
OK henning@
2004-08-10Correctly set the MED in outgoing UPDATEs. OK henning@Claudio Jeker
2004-08-06Monster diff to get one step closer to IPv6 support.Claudio Jeker
Cleanup path attribute handling. First of all kill struct attr_flags, all those infos are now in struct rde_aspath. Second move attribute parser functions into rde.c, rde_attr.c is shared between bgpd and bgpctl. Third reimplementation of the nexthop handling. Make it IPv6 ready and fix some major bug relating to "set nexthop". henning@ OK if it breaks nothing
2004-08-05As usual cleanup on exit. OK henning@Claudio Jeker
2004-08-05Cleanup aspath specific functions and api. Mainly switch to a refcnt basedClaudio Jeker
allocation. This helps to save a bit of RAM. looks good henning@
2004-08-05rename and move prefix_equal() to prefix_compare() which returns -1, 0, 1Claudio Jeker
similar to memcmp() and all other compare functions in bgpd. OK henning@
2004-07-30Add new announce type "default-route" which will only announce the defaultClaudio Jeker
route to the specified neighbor. Idea and OK henning@