summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd/rde.h
AgeCommit message (Collapse)Author
2017-01-25Hopefully the last of the struct rib rototilling. Peer just points to aClaudio Jeker
struct rib and not rib_desc since the full descriptor is almost never needed. This should now allow the update code to be changed.
2017-01-25Switch rde_generate_update and rde_send_kroute to accept a struct rib insteadClaudio Jeker
of the id. For this we move the rtableid into struct rib. Also move the update code in rib.c up to where the kroute code is. Makes more senses like that.
2017-01-24Save some space in struct rib_entry so it is back to 64bytes (on 64bit archs).Claudio Jeker
Doing this by folding the lock flag into a pointer and providing an accessor function for the rib pointer. This is an acceptable middle path for this important structure. OK benno@ on an earlier version
2017-01-23Rename rib pointer in struct prefix to re since it points to a rib_entry.Claudio Jeker
While there also remove a comment that is since a few years at least. OK gcc
2017-01-23Introduce a struct rib sitting between struct rib_desc and struct rib_tree.Claudio Jeker
This way the tree becomes a bit better decoupled.
2017-01-23Revert the struct rib_tree rename. I need a struct in between because ofClaudio Jeker
how struct rib_entry is used.
2017-01-23More rototilling, make rib_new and rib_find return a point to struct rib_descClaudio Jeker
2017-01-23Now rename struct rib_tree to struct rib. Again OK gccClaudio Jeker
2017-01-23Rename struct rib to struct rib_desc. Mechanical change, OK gccClaudio Jeker
2016-10-27Huawei squatted on BGP Path Attribute 30, and Cisco squatted on 31. So,Peter Hessler
IANA moved the Large Communities attribute to 32, which is a nice pun on the problem it is solving.
2016-10-14Add support for draft-ietf-idr-large-communityPeter Hessler
Joint work with Job Snijders, many thanks! OK benno@ deraadt@
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-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.
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@
2012-10-28Change email address in copyright to one that is valid.Claudio Jeker
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@
2011-09-21Fix nexthop_modify() to reset the flags when called. Until nowClaudio Jeker
set nexthop-self was sticky and so later set nexthop <IP> were not applied. Problem found and fix tested by Tony Sarendal. OK henning@
2011-09-20Move a few functions into util.c because bgpctl will need them soon.Claudio Jeker
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-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@
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-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-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-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-03-29I'm going to need community_ext_conv() outside of rde_attr.c soon, so moveClaudio Jeker
the prototype to rde.h
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-05Allow to filter for ext-community attributes. Currently only perfect matchesClaudio Jeker
work but that's already better then nothing. OK sthen@
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-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-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
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-10-05Load prefixes into new created RIBs at reload time by walking over theClaudio Jeker
Adj-RIB-In. This only works correctly when softreconfig in is enabled (which is the default). This is needed to allow dynamic creation of additional RIBs. OK henning@
2009-08-06Implement the error handling as proposed in draft-ietf-idr-optional-transitiveClaudio Jeker
for optional transitive attributes. In short if the partial bit is set on an optional transitive attribute but the attribute fails validation ignore the attribute or mark the path as ineligible instead of killing the session with a NOTIFICATION. Tested, input and OK sthen, OK henning
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-06Only the main Loc-RIB should update the FIB for now. So introduce aClaudio Jeker
F_RIB_NOFIB flag and apply it on all RIBs that are not F_RIB_NOEVALUATE.
2009-06-06Only generate updates for peers that are member of the RIB that update isClaudio Jeker
comming from.
2009-06-04Implement rib_find and add a rib id to struct rde_peer.Claudio Jeker
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-06-03Better way to allocate new RIBs.Claudio Jeker
2009-06-02Move the rest of the rib dump functions into rde_rib.c where it belongs.Claudio Jeker
2009-06-01Use only one list to queue the dump contextes on. Use the list in structClaudio Jeker
rib_context instead of the ctl specific rde_dump_ctx to make it more general.
2009-06-01Holy simplification batman. Use the per rib entry flags to lock entriesClaudio Jeker
when interrupting rib dumps and now we no longer need evil RB magic to find the next entry on restart.
2009-06-01Instead of storing a pointer to the RIB head in the RIB element use thatClaudio Jeker
space for a flags field and the RIB id. In the end bgpd will be able to lock RIB elements and therefore make it possible to interrupt all tree walks.