summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd/bgpd.h
AgeCommit message (Collapse)Author
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.
2011-09-18Reorder the headerfiles a bit. Move the bgpd specific prototypes out ofClaudio Jeker
mrt.h. Now mrt.h includes only protocol specific defines.
2011-05-01On reload the filtersets attached to a network need to be moved to theClaudio Jeker
existing network element. First free the old filterset and then move the new on top of it. This solves the reload issue with changing network statements. OK henning@
2010-10-24spacing and irrelevant glitches which disrupt lintTheo de Raadt
2010-06-27Instead of specifying the control sockets on the command line have themClaudio Jeker
in bgpd.conf. This allows to add/modify restricted control sockets on runtime. Feature request by a few people how often forgot to add -r path when restarting bgpd (including myself). NOTE: this removes the -s and -r arguments from bgpd so pay attention when updateing. jajaja sthen@, OK henning@
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-17Implement two new filters, max-as-len and max-as-seq. The first is limitingClaudio Jeker
the length of an AS path (matches if the path is longer then the specified lenght) the second matches when a sequence of the same AS number is longer then the specified length). max-as-len is good to protect crappy comercial bgp boxes from other crappy comercial bgp boxes. max-as-seq was a feature request from SwissIX and maybe EuroIX to find and filter prepends. Additinal testing and OK sthen@
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-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-28Allow neighbor-as in AS filter statements like:Claudio Jeker
match from any source-as neighbor-as set localpref 1000 OK 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-04-06Switch to a more address family independent nexthop imsg. Instead of passingClaudio Jeker
struct kroute or kroute6 pack the needed info into a struct bgpd_addr. No flames comming out of my and sthen@'s bgpd routers.
2010-03-29Implement a log_rd() function to print the route destinguisher in a niceClaudio Jeker
way. Use it for now in log_addr() to show VPN routes with a prepended RD. OK henning
2010-03-05Allow to filter for ext-community attributes. Currently only perfect matchesClaudio Jeker
work but that's already better then nothing. OK sthen@
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-10Switch rib_dump() to use AID instead of AFs. OK henning@Claudio Jeker
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-26support for set origin; based on an initial diff fromHenning Brauer
Sebastian Benoit <benoit-lists at fb12 dot de> who also tested this version claudio ok
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-09-04Use the address familiy of the neighbor IP to decide which MP type to use.Claudio Jeker
IPv4 session will still default to only announce inet unicast but now IPv6 session will by default use announce inet6 unicast. The defaults can be overridden on groups and in the neighbor itself but this new behaviour is way more sane then the old one. OK henning, sthen
2009-08-31Use UINT_MAX instead of ASNUM_MAX and get rid of this mostly useless define.Claudio Jeker
2009-07-23Send the used kroute along with the nexthop information. This allows usClaudio Jeker
to show all necessary information in bgpctl show next. OK henning@
2009-07-20Include more info in the bgpctl show nexthop ctl message. Mainly add theClaudio Jeker
gateway used for non-connected routes. This info was missing all the time and often resulted in massive confusion when the nexthop selection choosed a bad nexthop.
2009-06-12Move prefixlen2mask and inet6applymask to util.c so that we can kill theClaudio Jeker
copies in bgpctl.
2009-06-07First attempt at reload support for RIBs. There is some magic that I doClaudio Jeker
not fully understand but at least no flames are comming out of my test box anymore.
2009-06-06Reorder IMSG types to put the "exported" ones further down so they do notClaudio Jeker
change that often anymore.
2009-06-06Get ready for including imsg.h from a lib, when it comes along.Pierre-Yves Ritschard
2009-06-06sync bgpd/bgpctl with the common imsg code, making it lib ready as well.Eric Faurot
ok claudio@ pyr@
2009-06-06Make it possible to select the RIB that a show command should show.Claudio Jeker
2009-06-06Some preliminary filter magic to support multiple RIBs on the filters.Claudio Jeker
It is ugly but does the trick for now. Filters will be rewritten anyway. The rib specifier only makes sense on from rules. e.g. deny rib OMG from any
2009-06-05Make it possible to bind peers to a specified RIB. Now only filters andClaudio Jeker
bgpctl are missing to have full support of multiple RIBs.
2009-06-04Add "rde rib <name>" to the config and allow the rde to use these other RIBs.Claudio Jeker
Still a bit hackish, reload is missing and printconf as well. Looks good h@
2009-05-27add an option to change the "connect-retry" timer which defaults to 120s.Reyk Floeter
this can be used to decrease the failover time in specific carp'ed IBGP setups. ok henning@
2009-05-17Rework most of the RDE to allow multiple RIBs. This is mostly preparationClaudio Jeker
work by changing the way the RDE DB is built. struct prefix and struct pt_entry are simplified and extended with a rib_entry where the decision tree is run on. From now on a prefix can only reside on one particular RIB which simplifies the code a bit. Currently there are two fixed ribs (adj-rib-in and the local-rib) which needs to be made more dynamic in upcomming commits. This is work in progress, the RDE seems to work for me and sthen@ (no flames comming out of our testrouters but there is still a lot missing) Move into the tree to simplify developement -- henning@
2009-05-05fix a couple of comment typosStuart Henderson
2009-04-23allow bgpctl and bgpd.conf to contain 32-bit ASN written in ASPLAINStuart Henderson
format (RFC5396). ok claudio@ henning@
2009-03-26argh, do not reuse the global trans_as flag to be applied to the peerHenning Brauer
specific or we had to widen the peer specific flags without need. defien PERRFLAG_TRANS_AS instead and use that