summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd/bgpd.h
AgeCommit message (Collapse)Author
2017-10-15Add "ssv" variant which turns a rib route output into a singleTheo de Raadt
semicolon-seperated line, so that grep and such can operate easier; then use tr ';' '\n' to convert it to normal form later. This helps with scanning vast swathes of routes.. ok benno claudio job
2017-08-12allow filter rules to be written that affect ibgp or ebgp neighborsPeter Hessler
discussed with henning@ OK claudio@, benno@, job@
2017-08-11softreconfig in and out are on by default for ever and machines now haveClaudio Jeker
enough memory that it does not make sense to provide these knobs anymore. They just make the code more complex for no much gain. OK phessler@, benno@
2017-08-10handle extended communities in bgpctl.Sebastian Benoit
From Dennis Fondras, thanks! ok phessler@
2017-08-06Remove comma from last element since that is the terminator.Claudio Jeker
2017-08-06add a zeroed out element at the end of the iana_ext_comms array, soSebastian Benoit
that the iteration over it actually stops. ok and feedback from florian@ phessler@ and claudio@
2017-06-26add support for the "graceful shutdown" well-known community as describedPeter Hessler
in draft-ietf-grow-bgp-gshut from Job Snijders ok phessler@ benno@
2017-05-31Rework the way we do extended communities (mainly in the parser) and updateClaudio Jeker
the IANA table to a somewhat more complete list. This includes BGP Prefix Origin Validation State support via the ext-community ovs keyword. OK henning@ benno@ based on a diff by Job Snijders
2017-05-28Introduce log_peer_info() and make log_peer_warn() log at LOG_ERR insteadClaudio Jeker
of LOG_CRIT (which should only be used for fatal). OK benno@
2017-05-28so far, bgpd was hardcoded to use rtable 0 for nexthop verification.Henning Brauer
instead, use the rtable bgpd was started in (route -T <n> exec / rc.d daemon_rtable) for nexthop verification and as default Adj-RIB-In and Loc-RIB. This allows multiple bgpds in different rdomains on the same machine - bgp router virtualization if you like buzzwords. initial version written under contract more than a year ago, it took us a while to wrap our brains around the bgpd <-> rdomain interactions - 1) RIBs, 2) nexthop verification and 3) tcp sockets. ok & input phessler claudio benno
2017-05-28Implement an XON/XOFF protocol between the RDE and the SE to throttleClaudio Jeker
per control session and peer the generation of imsg in the RDE. This reduces the memory pressure in the SE substantially and also a bit in the RDE. Makes the RDE more responsive for bgpctl commands. Tested by me with 100 peers * 2000 prefixes and by phessler@ on an AMS-IX border router with 200+ session. Convergance time got quite a bit better. OK phessler@
2017-05-27Allow an administrator to disable the bgp loop detection algorithm,Peter Hessler
which is useful in very limited situations. Angry dragons and grues will hunt for you, if you use it. OK claudio@ sthen@ benno@
2017-05-27bump the size of ctl rib flagsPeter Hessler
OK claudio@
2017-05-27allow us to use 'local-as' in the filter languagePeter Hessler
"match in from any set community local-as:neighbor-as" OK claudio@
2017-05-27fix the reference to draft-ymbk-grow-blackholing, to RFC 7999Peter Hessler
2017-01-25Flag the Loc-RIB with F_RIB_LOCAL so we can remove one ugly hack somewhere elseClaudio Jeker
2017-01-24sync log.c from relayd et al to bgpd.Sebastian Benoit
there is still a little difference regarding handling of the verbosity value that will be handled later. ok claudio@ florian@
2017-01-13Add support for draft-ietf-idr-shutdownPeter Hessler
BGP state = Idle, marked down with shutdown reason "goodbye, we are upgrading to openbsd 6.1", down for 00:00:17 developed by Peter van Dijk <peter.van.dijk@powerdns.com> and Job Snijders <job@ntt.net>, thank you! OK benno@
2016-10-14Add support for draft-ietf-idr-large-communityPeter Hessler
Joint work with Job Snijders, many thanks! OK benno@ deraadt@
2016-10-05Let bgpd announce routes based on a route-label.Peter Hessler
OK henning@ benno@
2016-09-02work on making log.c similar in all daemons:Sebastian Benoit
move daemon-local functions into new logmsg.c, and reduce the (mostly whitespace) differences so that log.c's can be diffed easily. ok claudio@, feedback from henning@, deraadt@, reyk@
2016-06-06Add format attributes to the proper functions and then fix the warning inSebastian Benoit
session.c ok mpi@
2016-06-03Add operators =, !=, - (range), >< (exclsive range) to the as-pathSebastian Benoit
filters (AS, peer-as, source-as, transit-as). Add a use case (block illegal AS numbers) to the bgpd.conf example. feedback from claudio, sthen, florian, ok florian@ phessler@
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-11standardize a community that has been independently created by nearlyPeter Hessler
every single AS on the planet: the blackhole OK benno@, claudio@, sthen@
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-16Another ifmedia64 fix, this time for bgpd's ift2ifm().Stefan Sperling
And rename struct kif's media_type to if_type to avoid confusion with ifmedia's media type. Same rename in other daemons will follow. ok claudio henning benno
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-16Next round of config cleanup. Move various lists into the bgpd_config struct.Claudio Jeker
This is the next step to better split parsing and merging the config. OK benno@
2015-04-25allow us to write rules that match directly on the peer ASPeter Hessler
... allow from AS 1 prefix 192.0.2.0/24 ... Also adjust the IRR ruleset output to include the declared peer AS, instead of hoping they listed their neighbor IP address! OK benno@ older version OK: claudio@ henning@
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.
2015-03-14Move the command line options (mainly -d and -v) out of struct bgpd_configClaudio Jeker
into a own flag field since these can't be modified via a config reload. OK henning@ benno@ before lock
2014-11-03Convert the logic in yyerror(). Instead of creating a temporaryAlexander Bluhm
format string, create a temporary message. OK benno@ doug@ claudio@
2013-11-13Knob to set priority with which bgpd inserts routes into the kernelFlorian Obser
routing table. Need for it in "special" setups pointed out by Loic Blot (loic.blot _AT_ unix-experience _DOT_ fr) on tech. OK benno, henning
2013-10-19Merge the prefix and prefixlen filter bits into one filter. Change theClaudio Jeker
filter expansion so that rules are grouped by prefixes last. The RDE will then be able to optimize the rules into table lookups but that is a later step. As additional goodies it is now possible to use inet and inet6 on their own and or-longer can be used as a shorthand for prefixlen >= len. OK henning@ sthen@ florian@
2013-09-27typo in macro name; no md5 changeStuart Henderson
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-05-11change mrt rib dump ReopenTimerInterval from time_t to int. IntervallsSebastian Benoit
don't need to scale to 64 bits in this universe. ok claudio@ & florian@
2013-03-07Implements a few missing bits for better templates support:Claudio Jeker
- on config reload also adjust the cloned neighbors so that they get the config changes as well. - clean up sessions that are 1h idle but in state active (instead of down) - add bits to allow bgpctl to destroy cloned neighbors Tested by sthen@ some time ago, OK phessler@
2013-01-09Almost exactly 10 years ago, we changed the length of PF table names toPeter Hessler
32 chars. Allow bgpd to use these newfangled longer names. OK sthen@
2012-11-13Allow filtering based on the NEXTHOP attribute. This allows to build rulesClaudio Jeker
like: allow from any nexthop neighbor (to allow only prefixes that use the routers IP address as nexthop). Lots of testing, input and OK florian@
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-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-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-04-12The ebgp flags is just a truth value and it is better to not == 1 compares.Claudio Jeker
OK henning@ sthen@
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.