summaryrefslogtreecommitdiffstats
path: root/usr.sbin/bgpd/rde.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Pass the stale timestamp to path_remove_stale() removes a asp->peer dereferenceclaudio2018-08-061-2/+2
|
* Move nexthop and nexthop flags from the rde_aspath to struct prefix.claudio2018-08-031-22/+30
| | | | | struct prefix will be slowly becomming the hub of the rib. OK phessler@ job@
* Reshuffle order in struct rde_peer a bit. No functional change.claudio2018-07-311-3/+3
|
* Move nexthop into struct filterstate (including nexthop flags) and useclaudio2018-07-221-3/+11
| | | | | | them whereever possible. In some places (path_update, softreconfig_out handler) the nexthop state is temporarily folded back into the rde_aspath. Tested and OK benno@
* Move the nlri_get_prefix functions to util.c so that bgpctl can use them too.claudio2018-07-201-7/+1
|
* Use struct filterstate in rde_update_dispatch() and pass it down toclaudio2018-07-161-2/+2
| | | | | | functions like rde_update_update and path_update. This will allow to move more pointers from rde_aspath to the prefix. Looks good benno@
* improve the path hash function (instead of just hashing the aspath putclaudio2018-07-111-8/+5
| | | | | | most other attrs into the hash as well). At the same time use the full 64 bit of SipHash in various places. Tested by and OK benno@ phessler@
* On IMSG_CTL_SHOW_RIB_MEM also send back information of some of theclaudio2018-07-111-1/+4
| | | | | | hash structures used in the RDE. Makes it fairly obvious that more is needed in that area. OK phessler@ benno@
* Introduce a struct filterstate and pass this to rde_filter instead ofclaudio2018-07-091-3/+10
| | | | | | passing the asp. This is no longer using asp_get() and should be therefor be a bit lighter. Will also allow to put more stuff into the state. OK denis@ sthen@
* Prepare the ground for allowing temporary aspath object living on the stack.claudio2018-06-291-3/+4
| | | | | | | | | | To do this path_copy() gets a second argument (dst, src) and a new function path_prep() is introduced to initialize an aspath object. The current path_copy() usage is replaced with path_copy(path_get(), asp) which does the same. Additionally some const where added to the *_copy functions to make it more obvious which is the source and target. Also the pftable_ref() and rtlabel_ref() functions return now the id instead of void. OK sthen@
* Remove rde_aspath pointer from rde_filter since that argument can be fetchedclaudio2018-06-281-3/+2
| | | | | from the prefix instead. While there also switch to prefix_peer from asp->peer in rde_dump_rib_as(). Makes the code easier overall.
* Instead of passing the rde_aspath to nexthop_modify() pass pointers toclaudio2018-06-281-3/+3
| | | | the nexthop and the flags.
* Pass a struct prefix to rde_filter and remove some of the arguments whichclaudio2018-06-281-5/+7
| | | | | | are now fetched from struct prefix. Currently some trickery is needed for export default-route but this will get better once Adj-RIB-Out comes. OK benno@
* Just put the aspath and the peer directly into the prefix struct.claudio2018-06-271-6/+5
| | | | Needed for upcoming changes.
* Properly start reference counting struct nexthop. This removes the need forclaudio2018-06-251-4/+5
| | | | | | | some ugly workaround to make sure nexthop objects don't disapear while still being referenced. During initial lookup of a nexthop a extra reference is pulled but even that is now a bit cleaner than before. Tested by job@, dennis@, benno@ OK job@ dennis@
* Nothing is using the active and prefix count in struct rde_aspath.claudio2018-06-211-3/+1
| | | | | Remove them to make the code simpler. OK deraadt@ gsoares@
* Follow rfc8277 more closely and make make sure bgpd is encoding VPNv4claudio2018-02-101-3/+3
| | | | | withdraws they way other systems are doing it. Interop problem discovered by Andrew Thrift. Tested by Andrew and job@.
* Add prefix-sets, lists of prefixes which can be used in place of abenno2018-02-101-2/+2
| | | | | | prefix in a filter rule. Initial idea hashed out with job@ in Toronto. This is WIP, i'm commiting it now so we can work on it in the tree. ok florian@ claudio@
* Add plumbing inside of the prefix handling to put prefixes on either theclaudio2018-02-071-11/+9
| | | | | | | prefixes or updates list depending on flags passed to the functions. While there also introduce a similar flag for rde_aspath and adjust path_compare so that this flag is ignored (liked the linked one). OK benno@
* Switch a few lists to tailqs. Mainly the prefix list per aspath needsclaudio2018-02-051-12/+14
| | | | | to be a queue so that we can use it in the Adj-RIB-Out case. OK benno@
* Change struct prefix a bit. Make the aspath pointer opaque and remove theclaudio2018-02-051-14/+39
| | | | | | direct pointer to the pt_prefix struct. To getter functions prefix_aspath() and prefix_peer() added to make access of the opaque pointers possible. Looks good henning@ and benno@
* Clenaup RIB handling in the RDE. Introduce some defines for Adj-RIB-In andclaudio2018-02-041-1/+5
| | | | | Adj-RIB-Out and use them consistently. Makes code easier to read. OK benno@
* remove extended communities that have the transitive bit set frombenno2017-05-301-1/+3
| | | | | | routes announced to an ebgp peer (ref. rfc4360). While here remove the pratial flag from extended and large communities. ok claudio@
* Implement an XON/XOFF protocol between the RDE and the SE to throttleclaudio2017-05-281-4/+2
| | | | | | | | | 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@
* Hopefully the last of the struct rib rototilling. Peer just points to aclaudio2017-01-251-5/+6
| | | | | struct rib and not rib_desc since the full descriptor is almost never needed. This should now allow the update code to be changed.
* Switch rde_generate_update and rde_send_kroute to accept a struct rib insteadclaudio2017-01-251-17/+17
| | | | | 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.
* Save some space in struct rib_entry so it is back to 64bytes (on 64bit archs).claudio2017-01-241-4/+11
| | | | | | | 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
* Rename rib pointer in struct prefix to re since it points to a rib_entry.claudio2017-01-231-2/+2
| | | | | While there also remove a comment that is since a few years at least. OK gcc
* Introduce a struct rib sitting between struct rib_desc and struct rib_tree.claudio2017-01-231-14/+19
| | | | This way the tree becomes a bit better decoupled.
* Revert the struct rib_tree rename. I need a struct in between because ofclaudio2017-01-231-3/+3
| | | | how struct rib_entry is used.
* More rototilling, make rib_new and rib_find return a point to struct rib_descclaudio2017-01-231-6/+5
|
* Now rename struct rib_tree to struct rib. Again OK gccclaudio2017-01-231-3/+3
|
* Rename struct rib to struct rib_desc. Mechanical change, OK gccclaudio2017-01-231-12/+12
|
* Huawei squatted on BGP Path Attribute 30, and Cisco squatted on 31. So,phessler2016-10-271-2/+2
| | | | | IANA moved the Large Communities attribute to 32, which is a nice pun on the problem it is solving.
* Add support for draft-ietf-idr-large-communityphessler2016-10-141-2/+9
| | | | | Joint work with Job Snijders, many thanks! OK benno@ deraadt@
* Radically improve the performance of bgpd filters. Based on PF's skipphessler2015-11-061-1/+2
| | | | | | | | | | | | | | 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@
* rename rde_free_filter() to filterlist_free() and start using it outsideclaudio2015-03-141-2/+1
| | | | | of the RDE to free the filterlists. Also refactor common code to merge filterlists into its own function. Makes the code look nicer.
* Rewrite the internals of the RDE reload logic.claudio2013-08-141-7/+8
| | | | | | | | 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@
* on graceful restart, the number of prefixes could be counted wrong,benno2013-07-171-2/+2
| | | | | | | triping max-prefix. fix it this way, at least until prefix accounting is done better. diff from florian@ ok claudio@
* Change email address in copyright to one that is valid.claudio2012-10-281-2/+2
|
* Better graceful restart support (implementing more then just the EoR record).claudio2012-09-121-1/+5
| | | | | | | | 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@
* By default mask the reserved bits and the ext len bit in the attributeclaudio2012-08-121-1/+4
| | | | | | | | 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@
* Fix nexthop_modify() to reset the flags when called. Until nowclaudio2011-09-211-1/+2
| | | | | | set nexthop-self was sticky and so later set nexthop <IP> were not applied. Problem found and fix tested by Tony Sarendal. OK henning@
* Move a few functions into util.c because bgpctl will need them soon.claudio2011-09-201-7/+1
|
* Reorder the headerfiles a bit. Move the bgpd specific prototypes out ofclaudio2011-09-181-38/+43
| | | | mrt.h. Now mrt.h includes only protocol specific defines.
* Implement new mrt table dump format as specified in draft-ietf-grow-mrt.claudio2011-09-171-1/+3
| | | | | Tested with IP and IPv6 sessions and against the libbgpdump parser. OK henning@
* Accept but ignore (treat as withdraw) updates with AS_CONFED_* pathclaudio2010-11-181-1/+4
| | | | | | segments. Bgpd does not support confederations but it is too extreme to close a session because a path contained such elements. OK henning@, sthen@
* Rename some imsg bits to make namespace collisions less likely buf tonicm2010-05-261-2/+2
| | | | | | ibuf, buf_read to ibuf_read, READ_BUF_SIZE to IBUF_READ_SIZE. ok henning gilles claudio jacekm deraadt
* Add softreconfig support for peers changing the RIB. Done by first unloadingclaudio2010-05-191-1/+2
| | | | | | | 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@
* Implement two new filters, max-as-len and max-as-seq. The first is limitingclaudio2010-05-171-1/+2
| | | | | | | | | | 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@