summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd/rde.c
AgeCommit message (Collapse)Author
2012-09-18Expose the local weight in the ctl_show_rib struct so bgpctl can print it.Claudio Jeker
OK sthen@ henning@
2012-09-18Only allow one reload request at a time in bgpd. Needed for further work.Claudio Jeker
OK sthen@, benno@, henning@
2012-09-17Unbreak. gcc 2 at least complains if a declaration is ended by two semicolons.Miod Vallat
2012-09-12Better graceful restart support (implementing more then just the EoR record).Claudio Jeker
This implements only the "Restarting Client" bits of the RFC -- in other words bgpd will keep the FIB when the client restarts but it will not do GR when restarting itself. The capability is still off by default (you need "announce restart yes" to enable it). Tested by Anders Berggren. OK sthen@
2012-08-12By default mask the reserved bits and the ext len bit in the attributeClaudio Jeker
flags field. Some systems seem to start sending bad flags around which cause session failures in bgpd. Make sure that bgpd ignores the must be zero flags correctly and ensure that they are always reset to zero when sending updates out. Reported and patch tested by Laurent CARON, OK henning@
2012-05-27Extend the network code to allow attributes to be passed in with prefixes.Claudio Jeker
In the end this will allow anyone to use MRT table dumps to load prefixes into a bgpd instance. For example you can download the RIPE dumps and load full-feeds onto your laptop until the poor thing dies. OK henning@ sthen@
2012-05-22Fix a warning message to print the correct information. OK henning@ sthen@Claudio Jeker
2012-04-12The ebgp flags is just a truth value and it is better to not == 1 compares.Claudio Jeker
OK henning@ sthen@
2012-04-07The Route Distinguishers should not be used to control distribution.Claudio Jeker
Found by and fix tested by Rimi Philippe
2012-03-27Introduce F_CTL_ACTIVE a flag to only show selected pathes.Claudio Jeker
Requested and OK deraadt@, OK henning@
2011-09-20Move a few functions into util.c because bgpctl will need them soon.Claudio Jeker
2011-09-19remove an unused ctl struct and remove some unneeded values fromClaudio Jeker
struct ctl_show_rib since bgpctl does not look at them at all.
2011-09-17Implement new mrt table dump format as specified in draft-ietf-grow-mrt.Claudio Jeker
Tested with IP and IPv6 sessions and against the libbgpdump parser. OK henning@
2011-07-09remove that rlimit code, rc.d and login classes do it much betterer theseHenning Brauer
days. screaming bob ok claudio
2011-02-15Use log_as() to print the offending neighbor-as instead of printing itClaudio Jeker
as an int. This way 4-byte ASes should be printed nicely. OK deraadt@ henning@
2011-01-29improve error msg when enforce-neighbor-as is on and the path doesn'tHenning Brauer
start with the neighbor-as. makes finding the offender easier. from Sebastian Benoit <benoit-lists at fb12.de>, claudio agrees
2011-01-27change a logged error from 'enforce remote-as' to the correctStuart Henderson
'enforce neighbor-as'; from Sebastian Benoit on tech@.
2010-12-23Increase the DATA limit in the RDE to the max value and do the sameClaudio Jeker
for NOFILE in the session engine. OK henning, sthen@
2010-11-30Do what the comment actually says. Ignore the full attribute not only theClaudio Jeker
header. ATTR_UNDEF is still a bit strange though but at least it will now parse and ignore such a freak attribute correctly.
2010-11-24fix spelling in an error messageStuart Henderson
2010-11-18Accept but ignore (treat as withdraw) updates with AS_CONFED_* pathClaudio Jeker
segments. Bgpd does not support confederations but it is too extreme to close a session because a path contained such elements. OK henning@, sthen@
2010-11-10Make sure that the initial configuration of the child is zeroed outClaudio Jeker
by using calloc(). This fixes an issue where the RDE would start up as route-collector because uninitialized memory made the RDE switch to that mode. OK henning@, sthen@, phessler@
2010-10-15Add a few more wanrings to the UPDATE parser. Mainly to warn whenClaudio Jeker
attributes are ignored or UPDATEs are invalidated and withdrawn. While there use % to check if a attribute is a multiple of X. OK henning@, sthen@
2010-09-02remove trailing spaces and tabs from source code; no binary changesIgor Sobrado
(verified by both sthen@ and me). ok sthen@; "just commit it" claudio@
2010-07-14Fix a mrt fd leak by moving the block which closes finished dumps.Claudio Jeker
The previous location also depended on poll results and in most cases was therefor not entered because finished dumps are not added to the poll array. Problem reported by Peter Haag, OK henning@
2010-05-26Rename some imsg bits to make namespace collisions less likely buf toNicholas Marriott
ibuf, buf_read to ibuf_read, READ_BUF_SIZE to IBUF_READ_SIZE. ok henning gilles claudio jacekm deraadt
2010-05-19Add softreconfig support for peers changing the RIB. Done by first unloadingClaudio Jeker
the old RIB and then via softreconfig in and a special softreconfig out loading the new RIB. Feature requested and testeded by Elisa Jasinska. OK henning@
2010-05-17Last bits of MPLS VPN support. Hook kernel routing tables and RIB together.Claudio Jeker
This adds a bit of new config to specify the mapping between an rdomain and the BGP MPLS VPN instance, example: rdomain 1 { descr "CUSTOMER1" rd 65003:1 import-target rt 65003:3 export-target rt 65003:1 depend on mpe0 network 192.168.224/24 } The "depend on mpe0" is a but ugly but for now this is the quickest way to figure out which interface bgp should use to insert the MPLS routes. A big side-effect of this diff is that networks are now internally distributed through kroute.c. This needs some kernel changes that will follow hopefully soon. OK henning@
2010-05-04Assuming that a prefixlen 32 is a host route is not clever when IPv6 comesClaudio Jeker
into play. Check the AID and use 32 or 128 based on the address family. Now bgpctl show rib <IPv6 addr> works like in the IPv4 case. Bug reported and fix made during yesterday's Swinog BE#85
2010-05-03Make it possible to load multiple routing tables at the same time and useClaudio Jeker
those for alternate RIBs. This allows to use "rde rib TESTIT rtable 1". NOTE: nexthop verification has changed for alternate tables. For now nexthop will only be verified against the main routing table (id 0). Because of this "nexthop qualify via bgp" may now compare the nexthops against bgpd routes from a different RIB. Tested by sthen@, OK to move on by henning@
2010-04-13Instead of passing AF specific struct kroutes over imsgs use a structClaudio Jeker
kroute_full structure that is AF independent and has all information in it. Simplifies the communication between processes and reduces the number of imsg types. This is another step to add FIB support to BGP MPLS VPNs.
2010-03-30Hmpf, aid2af() leftover from the time I did the transition that should notClaudio Jeker
be there. network X set nexthop Y failed because of this.
2010-03-29We always allocate rib ids dynamicaly so there is no need for allowingClaudio Jeker
fixed id allocation. Makes code simpler. OK henning
2010-03-03Replace enum rib_state with enum reconf_action since their doing the same.Claudio Jeker
NEW is now REINIT, ACTIVE is KEEP and DELETE and NONE stay the same.
2010-02-09Don't hardcode the AID to AID_INET6 when sending MP EoR updates.Claudio Jeker
This will allow AID_VPN_IPv4 to do EoRs as well.
2010-02-08Unbreak IPv6 local address lookups. Some idiot aka me optimised a loop andClaudio Jeker
because of that either the IPv4 or IPv6 local address was not set. Because of this prefixes were sent out with all zero nexthops.
2010-02-08It is enough that peer->capa.mp[i] is non zero. It does not need to be 1.Claudio Jeker
2010-01-13Add support for BGP MPLS VPN aka RFC 4364. This is only the RDE part soClaudio Jeker
that it is possible to use OpenBGPD as a route-reflector for VPNv4. Some clean up of the BGP MP code so that multiple protocols are easier supported. kroute/kernel support not yet done but comming. OK henning@, reyk@
2010-01-11Make sure we do not add trailing garbage while parsing a prefix that has aClaudio Jeker
prefixlen that is not a multiple of 8. Found while reading the RFC. OK henning@
2010-01-10Generate a EoR marker in the update list instead of sending it independentClaudio Jeker
of the actual update dump. This will get us the right barrier and the EoR is no longer sent way before the actual dump. Currently a nop since graceful restart is turned off (unless you have announce restart yes in the config). put it in henning@
2010-01-10Switch rib_dump() to use AID instead of AFs. OK henning@Claudio Jeker
2010-01-05Make sure that all important config variables are synced on a reload inClaudio Jeker
the SE. This got more important since we use the reload all the time now. Found out the hard way and fix tested by Laurent CARON
2009-12-31Instead of passing the config via arguments to the childs on bootup issueClaudio Jeker
a config reload as first step in bootup. This allows childs to start with an empty config and a lot of special cleanup code can bite the dust. Testing by myself and sthen@ with a few configs (more testing welcome). Seems like a good idea henning@ & sthen@
2009-12-18Merge rde_filter_community() with community_match() and kill a uselessClaudio Jeker
indirection.
2009-12-16Implement "set ext-community [delete] subtype key:value" to set and deleteClaudio Jeker
extended communities as specified in RFC 4360. No matching implemented yet and stuff like * and neighbor-as are neither supported but will be soon. Looks good henning & sthen, manpage fixed by jmc
2009-12-08Big AID change part two. This changes the mp capability into an array ofClaudio Jeker
flags. This makes a lot of code much easier since the comparison is now trivial. Additionally calculate the negotiated capabilities for a session in the SE and pass that and only that to the RDE. This makes the decisions in the RDE a lot easier. OK henning@
2009-12-01Use an artificial address family id in struct bgpd_addr and almost everywhereClaudio Jeker
else. Adds conversion functions to map AFI/SAFI and the Unix AF_ values from and into AID used in bgpd. This is needed to support things like MPLS VPN and other upcomming changes that need to play a lot with AFI/SAFI pairs. Mostly mechanical change, henning@ has no particular issues with this. Must go in so that I can continue working.
2009-11-11Plug two memory leaks in error pathes. Found by parfait. OK henning, jsgClaudio Jeker
2009-11-02Implement IMSG_CTL_LOG_VERBOSE similar to ospfd. Even though bgpd has almostClaudio Jeker
no log_debug() it makes more sense to make all routing daemons behave the same.
2009-10-28Free correct buffer.Claudio Jeker