summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd/rde_rib.c
AgeCommit message (Collapse)Author
2007-06-01Remove a stupid wrapper function that does nothing more then calling anotherClaudio Jeker
function with the same arguments.
2007-05-11Various spelling fixes from Stuart Henderson.Claudio Jeker
2007-04-02Typo.Claudio Jeker
2007-02-22KNFHenning Brauer
2007-01-11Correct logic in path_update() so that moves are only done when needed.Claudio Jeker
Previously prefix changes of neighbors with softreconfig in disabled where using prefix_add() instead of prefix_move(). Luckily prefix_add() has additional logic to detect this case and calls prefix_move() itself. This made backtraces of a totaly different issue so strange that I was hunting a bug for weeks at the completely wrong spot. Doh!
2006-12-12Change nexthop_delete() to be more obvious what's going on. No functionalClaudio Jeker
change. OK henning@
2006-12-12Even IPv6 has a prefixlen limit. This ensures that we do not overflow theClaudio Jeker
struct in6_addr later on. OK henning@
2006-12-12In path_remove() remove only local prefixes from the pftable.Claudio Jeker
OK henning@
2006-06-01Copy the pftableid in path_copy and correctly do the ref/unref dance inClaudio Jeker
path_copy and path_put. Diff from Kevin Brintnall, looks good henning@
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-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-15In nexthop_compare() if the two passed pointers point to the same objectClaudio Jeker
the odds are better than good that there is no difference.
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-24It is possible that a prefix is part of two RIBs in that case prefix_remove()Claudio Jeker
needs to be extra careful and only remove the prefix from the specified RIB. Looks good henning@
2006-01-24KNFHenning Brauer
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-09Ups. Inverse logic.Claudio Jeker
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-03Track some (memory) statistics in the RDE. Accessible via bgpctl.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-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-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-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-26Move the path_empty()/path_destroy() check out of the inner for-loop.Claudio Jeker
Makes the code more obvious. Idea from tedu@ 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-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-19Only unlink and link the asp in nexthop_modify if the asp is linked.Claudio Jeker
OK henning@
2004-11-10prefix_write() works also for IPv6. OK henning@Claudio Jeker
2004-11-10Remove no longer needed code. OK henning@Claudio Jeker
2004-08-17Always update prefix timestamp even if nothing has changed. Without thisClaudio Jeker
networks disappear after reload. 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-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-05Get rid of some statistics stuff that is no longer needed but helped in theClaudio Jeker
beginning. OK henning@
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-05struct prefix has a pointer to the peer so use it everywhere directly insteadClaudio Jeker
of the detour via aspath.
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-05fix a few KNF falloutsHenning Brauer
2004-06-22Cleanup. jajaja henning@Claudio Jeker
2004-06-22Make the RDE IPv6 ready missing is the message handling. The internalClaudio Jeker
prefix tree changed form a hash table to a per AF RB tree. OK henning@ some ideas are from Brent Graveland.
2004-06-22introduce kroute6, which will be used to build a seperate v6 tableHenning Brauer
(smashing them into the v4 table would raise the memory requirements far too much), and make kroute_nexthop (where we are not under such memory pressure, you don't have a hundred thousand nexthops) v4/v6. change existing callers to use the v4 part, claudio ok