summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd/rde.c
AgeCommit message (Collapse)Author
2015-12-22commited -> committedmmcc
2015-12-03claudio questioned the need for pledge(unix) in the rde, and i thinkSebastian Benoit
he is right. ok claudio@
2015-11-06Radically improve the performance of bgpd filters. Based on PF's skipPeter Hessler
steps (and uses much of the same code). In a torture test of ~600k prefix filters and 65k prefixes, convergance time goes from 35 minutes to 30 seconds. Many thanks to LONAP for providing a base configuration for torture testing. many discussions with claudio@, benno@, sthen@ and the rest of the bgpd crowd OK sthen@ benno@
2015-10-25Only run the rib_dump_runner() if there is something pending and theClaudio Jeker
control socket has not many messages queued.
2015-10-09Change all tame callers to namechange to pledge(2).Theo de Raadt
2015-10-07In theory, bgpd should be happy with tame "stdio unix route recvfd".Theo de Raadt
Let's hear from people's experiences by commiting it.
2015-09-21Let us log all updates sent from an individual peer. Since this can bePeter Hessler
applied to a group, also let us disable logging on a sub-member of the group. Very handy for debugging naughty peers on a router with multiple peers. OK benno@
2015-09-19Use correct function name in error messageClaudio Jeker
2015-08-30rename a variable "err" to "error"Theo de Raadt
2015-08-04Give more precise errors, to help track when bgpd quitsPeter Hessler
OK florian@ benno@ sthen@ deraadt@
2015-07-20Make bgpd execute the RDE and session engine process instead of just forking.Claudio Jeker
This way ASLR and stack cookies are per process. With input from benno@ and deraadt@ OK benno@
2015-07-18give bgpd's fatal() varargs and use it to instrument bgpd fatal()Sebastian Benoit
calls to aid in debugging henning@ "makes sense to me", sthen@ "yes please", ok phessler@
2015-07-16fix pasto in error stringBret Lambert
ok claudio@
2015-06-21There is a race between sending notifications to the SE and getting a newClaudio Jeker
peer_up event in the RDE. This can be triggered by graceful restart. So remove the panic and replace it with roughly what peer_down does. OK phessler and henning
2015-06-19show the number of (currently) known prefixes and the max-prefix limit,Peter Hessler
when we terminate the session. since we terminate the session as soon as we go above the limit, show '>' since there may be more that we haven't/won't process. OK benno@
2015-03-14rename rde_free_filter() to filterlist_free() and start using it outsideClaudio Jeker
of the RDE to free the filterlists. Also refactor common code to merge filterlists into its own function. Makes the code look nicer.
2014-10-08Use reallocarray() throughout to spot multiplicative int overflow.Theo de Raadt
ok henning benno
2014-04-13fix language/spelling in error stringBret Lambert
ok claudio@
2014-01-22Fix a bug where stale routes were not properly flushed on sessions announcingClaudio Jeker
the graceful restart capability. The bug is triggered when a router does not reconnect before the graceful restart timeout fires. This removes the checks for the CAPA_GR_FORWARD flag in the timeout and IMSG_SESSION_RESTARTED handler. CAPA_GR_RESTARTING is indicating that bgpd is currently doing a graceful restart for this neighbor and therefore the SE must issue a flush of stale routes in some way. CAPA_GR_FORWARD on the other hand is only indicating that the neighbor actually preserved the forwarding state which is too strict for the timeout handler. Tested by sthen@, florian@ and benno@
2013-11-13from claudioSebastian Benoit
"Let msgbuf_write return -1 with errno EAGAIN. The users then must check if this was the case and readd the event or poll again. The current handling in the imsg code is wrong for sure." ok gilles, benno
2013-08-14Rewrite the internals of the RDE reload logic.Claudio Jeker
This is the first step to make bgpd reload non blocking in the RDE. It also speeds up the reload time a fair bit in some cases (mainly if you run with multiple RIBs and have larger filtersets) and it should also fix a few edge cases on reloads. Testing done by benno@, florian@ and sthen@ OK henning@ and benno@
2013-07-17on graceful restart, the number of prefixes could be counted wrong,Sebastian Benoit
triping max-prefix. fix it this way, at least until prefix accounting is done better. diff from florian@ ok claudio@
2013-07-10Change the way the RDE updates its peer list. The SE is now always sendingClaudio Jeker
a IMSG_SESSION_ADD message to the RDE when a peer comes up or when a reload happens. The IMSG_SESSION_ADD has the full current config of the peer and so the RDE should end up with correct values. This affects mostly maxprefix and the RIB settings. OK henning@
2013-05-31Unfuck BGP MPLS VPNs that got broken by the last few reload related commits.Claudio Jeker
OK henning@
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