summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd/rde_update.c
AgeCommit message (Collapse)Author
2007-05-11Various spelling fixes from Stuart Henderson.Claudio Jeker
2007-04-23Make bgpd 4-byte AS compatible. All internal representations of AS numbersClaudio Jeker
are now 4-byte instead of the old 2-byte numbers. The only exception are communities because they can not be switched. The RDE will inflate and deflate the ASPATH and AGGREGATOR attributes on demand and create the NEW_ASPATH and NEW_AGGREGATOR field whenever needed. Both old and new stile sessions are supported and can be mixed. Currently new stile sessions with the 4-byte AS number capability turned on are only enabled if one of the AS numbers involved is a 4-byte one. This is based on an initial diff by Geoff Huston gih (at) apnic (dot) net Cleanup, testing and bug-fixes by myself (via AS 3.10). Currently mrt table dumps are producing incompatible output this will be fixed afterwards -- this diff is already big enough. "get it in if you think it is ready" henning@
2007-04-06Count the updates and withdraws for additional statisic gathering.Claudio Jeker
Discussed with henning@
2007-03-16A few more s/2858/4760/ and use RFC <number> everywhere.Claudio Jeker
2007-03-16Update multiprotocol extension code to RFC 4760. This actually removesClaudio Jeker
a few things we actually never realy cared about. OK henning@
2007-01-31Do not check that the aspath is loopfree for the peer when sending updates.Claudio Jeker
This is an undocumented optimisation that fails with the introduction of AS 23456 as placeholder for 4-byte ASN. OK henning@
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-04-21Remove function prototype that was never used. From deraadt@Claudio Jeker
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-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
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-29even more spaces and tabs.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-19tsc tsc tsc, tabs are not always holyHenning 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-06-16use prefixlen2mask() instead of doing the bitshifting by hand; fixes theHenning Brauer
zero prefixlen case (32 bit shift on 32 bit val -> undefined result) spotted by Moritz Grimm and otto
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@
2005-02-07spelling fixDavid Krause
2004-11-11spaces at EOL in comments, spotted by theoHenning Brauer
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-09-28Add prepend-neighbor feature. Prepend the remote-as n times similar toClaudio Jeker
prepend-self. Only for incomming UPDATEs. OK henning@
2004-08-20Grrr. copy paste error. Dump MED and not local-pref. OK henning@Claudio Jeker
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-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-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-07-30Add new announce type "default-route" which will only announce the defaultClaudio Jeker
route to the specified neighbor. Idea and OK henning@
2004-07-13fix some typosJared Yanovich
ok henning otto
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-20at least somewhat consistently name the TAILQ_ENTRYs... this confused meHenning Brauer
more than once
2004-05-21RFC 2796 bgp route reflector support. This is very useful in conjunctionClaudio Jeker
with templates. looks good, go for it henning@
2004-04-30spellingTheo de Raadt
2004-03-20comment spelling fixes; ok henning@David Krause
2004-03-19Fix memory leak in error path. Found by Patrick Latifi. OK henning@Claudio Jeker
2004-03-11Add basic support for communities. Currently it is only possible to filterClaudio Jeker
on communities, e.g match from any community 24640:* set localpref 666 OK henning@
2004-03-09When a new prefix is filtered it is necessary to remove the old prefix.Claudio Jeker
This is done by a recursive call that does the withdraw. OK henning@
2004-03-04no ; after RB_PROTOTYPE / RB_GENERATEHenning Brauer
From: Andrey Matveev <andrushock@korovino.net>
2004-03-02Use ntohl() to compare in_addr_t so the tree is nicely sorted.Claudio Jeker
2004-03-01spellingTheo de Raadt
2004-02-27remove unneded peer pointer in struct prefix and change a in_addr_t toClaudio Jeker
struct in_addr. OK henning@