summaryrefslogtreecommitdiff
path: root/proto/bgp
AgeCommit message (Collapse)Author
2020-04-09Configuration strings are constant.Maria Matejka
This is merely a const propagation. There was no problem in there.
2020-03-03BGP: Handle flowspec rules without dst partOndrej Zajicek (work)
The RFC 5575 does not explicitly reject flowspec rules without dst part, it just requires dst part in validation procedure for feasibility, which we do not implement anyway. Thus flow without dst prefix is syntactically valid, but unfeasible (if feasibilty testing is done). Thanks to Alex D. for the bugreport.
2020-02-27BGP: Support for MD5SIG together with remote rangeOndrej Zajicek (work)
When dynamic BGP with remote range is configured, MD5SIG needs to use newer socket option (TCP_MD5SIG_EXT) to specify remote addres range for listening socket. Thanks to Adam KuĊ‚agowski for the suggestion.
2019-12-03BGP: Add some statisticsOndrej Zajicek (work)
Add some statistic counters to BGP consistent with BGP MIB (RFC 4273), including persistent 'FSM established transitions'.
2019-11-18BGP: Fix processing of IPv6 FlowspecOndrej Zajicek (work)
During NLRI parsing of IPv6 Flowspec, dst prefix was not properly extracted from NLRI, therefore a received flow was stored in a different position in flowspec routing table, and was not reachable by command 'show route <flow>'. Add proper prefix part accessors to flowspec code and use them from BGP NLRI parsing code. Thanks to Alex D. for the bugreport.
2019-11-10BGP: Add option to enforce first AS in AS_PATHOndrej Zajicek (work)
This is optional check described in RFC 4271. Although this can be also done by filters, it is widely implemented option in BGP implementations. Thanks to Eugene Bogomazov for the original patch.
2019-11-04BGP: Add option to reject AS_SETsOndrej Zajicek (work)
There is a pending draft to make them obsolete
2019-10-26BGP: RFC 8654 got releasedOndrej Zajicek (work)
2019-10-24BGP: Fix handling of transitive extended communitiesOndrej Zajicek (work)
Transitive extended communities should be removed on external sessions, the old code them in all cases. Thanks to Jean-Daniel Pauget for the original patch.
2019-10-10BGP: Fix reconfiguration with import tableOndrej Zajicek (work)
Change of some options requires route refresh, but when import table is active, channel reload is done from it instead of doing full route refresh. So in this case we request it internally.
2019-10-09BGP: AIGP metric support (RFC 7311)Ondrej Zajicek (work)
2019-09-17BGP: Fix setup with multiple dynamic BGP rangesOndrej Zajicek (work)
Based on a patch from Liam Nattrass, thanks.
2019-09-09BGP: Fix handling of bgp_aggregator atttributeOndrej Zajicek (work)
The attribute should not be modifiable by filters as we do not support its type.
2019-09-09BGP: Fix bugs in handling of shutdown messagesOndrej Zajicek (work)
There is an improper check for valid message size, which may lead to stack overflow and buffer leaks to log when a large message is received. Thanks to Daniel McCarney for bugreport and analysis.
2019-08-21BGP: Use reallocation for capability structureOndrej Zajicek (work)
Instead of having large stack buffer for max amount of AFI/SAFI pairs. The old code is not correct w.r.t. extendeded option length, as more AFI/SAFI pairs may fit into the capability option.
2019-08-20BGP: Implement extended optional parameters lengthOndrej Zajicek (work)
Extends BGP options/capabilities data length to 16bit, to avoid issues with too many capabilities. See draft-ietf-idr-ext-opt-param-07
2019-08-14BGP: implement Adj-RIB-OutOndrej Zajicek (work)
The patch implements optional internal export table to a channel and hooks it to BGP so it can be used as Adj-RIB-Out. When enabled, all exported (post-filtered) routes are stored there. An export table can be examined using e.g. 'show route export table bgp1.ipv4'.
2019-08-06BGP: Improve reconfigurationOndrej Zajicek (work)
Several BGP channel options (including 'next hop self') could be reconfigured without session reset, with just route refeed/refresh. The patch improves reconfiguration code to do it that way.
2019-08-06BGP: Fix 'deterministic med' to work with 'merge paths'Ondrej Zajicek (work)
The 'deterministic med' option is implemented by suppressing other than best-in-group routes (grouped by ASN) from best route selection. This interferes with 'merge paths' as supressed routes are no longer mergable with best route. This is fixed by suppressing only those routes that are not mergable with best-in-group route.
2019-07-24Merge remote-tracking branch 'origin/mq-filter-stack'Ondrej Zajicek (work)
2019-07-23RPKI: Fix reconfiguration when ssh parameters are undefinedOndrej Zajicek (work)
2019-07-17BFD: Support for VRFsOndrej Zajicek (work)
Allow multiple BFD instances in separate VRFs, dispatch BFD requests according to VRFs. Thanks to Alexander Zubkov for notice and patches.
2019-07-03Merge branch 'master' into mq-filter-stackMaria Matejka
2019-07-03Dynamic attributes definition split whether it is bitmask or not.Maria Matejka
2019-07-01BGP: Prefix hash is too small, increase its max size.Maria Jan Matejka
This doesn't make any change for you until you have millions of updates waiting to be sent. Increasing the max hash size from 2^20 to 2^24.
2019-07-01BGP: split tx explicitlyMaria Jan Matejka
If BGP has too many data to send and BIRD is slower than the link, TX is always possible until all data is sent. This patch limits maximum number of generated BGP messages in one iteration of TX hook.
2019-06-30Nest: Add command to request graceful restartOndrej Zajicek (work)
When 'graceful down' command is entered, protocols are shut down with regard to graceful restart. Namely Kernel protocol does not remove routes and BGP protocol does not send notification, just closes the connection.
2019-06-12BGP: Fix bug introduced in one of last patchesOndrej Zajicek (work)
2019-04-30BGP: Compliance with RFC8203bisAlexander Azimov
2019-04-30BGP: Output Local AS number in show protocolOndrej Zajicek (work)
Useful for implementation of agents implementing the SNMP-BGP MIB, which requires the local AS of a session to be specified. Thanks to Jan-Philipp Litza for the patch.
2019-04-30BGP: Dynamic BGPOndrej Zajicek (work)
Support for dynamically spawning BGP protocols for incoming connections. Use 'neighbor range' to specify range of valid neighbor addresses, then incoming connections from these addresses spawn new BGP instances.
2019-04-08BGP: Handle corner cases in event orderingOndrej Zajicek (work)
When BGP connection is opened, it may happen that rx hook (with remote OPEN) is called before tx hook (for local OPEN). Therefore, we need to do internal changes (like setting local_caps) synchronously with OPENSENT transition and we need to ensure that OPEN is sent before KEEPALIVE.
2019-04-03BGP: Promiscuous ASN modeOndrej Zajicek (work)
Allow to specify just 'internal' or 'external' for remote neighbor instead of specific ASN. In the second case that means BGP peers with any non-local ASNs are accepted.
2019-04-02BGP: Separate runtime and config usage of local/remote ip and as fieldsOndrej Zajicek (work)
2019-03-19BGP: Mandatory option for channelsOndrej Zajicek (work)
Allow to mark channel to be mandatory, and do not allow BGP sessions if no common AFI/SAFI is established.
2019-03-18BGP: Handle case where capabilites are not usedOndrej Zajicek (work)
If peer does not announce capabilities at all, or when we have capabilities disabled, handle that as implicit IPv4 unicast.
2019-02-20Filter refactoring: dropped the recursion from the interpreterMaria Matejka
This is a major change of how the filters are interpreted. If everything works how it should, it should not affect you unless you are hacking the filters themselves. Anyway, this change should make a huge improvement in the filter performance as previous benchmarks showed that our major problem lies in the recursion itself. There are also some changes in nest and protocols, related mostly to spreading const declarations throughout the whole BIRD and also to refactored dynamic attribute definitions. The need of these came up during the whole work and it is too difficult to split out these not-so-related changes.
2019-01-26BGP: Cleanup channels when going downOndrej Zajicek (work)
When going up, uncleaned old channel state may trigger unexpected conditions crashing bird.
2019-01-02BGP: Better dispatch of incoming connectionsOndrej Zajicek (work)
Since v2 we have multiple listening BGP sockets, and each BGP protocol has associated one of them. Use listening socket that accepted the incoming connection as a key in the dispatch process so only BGP protocols assocaited with that listening socket can be selected. This is necesary for proper dispatch when VRFs are used.
2019-01-02BGP: Postpone setting link_addrOndrej Zajicek (work)
It may happen that the LLv6 address for given iface is not defined during BGP start, so we postpone the check to the the session establishment.
2018-12-16BGP: Extend 'next hop keep' and 'next hop self' optionsOndrej Zajicek (work)
Extend 'next hop keep' and 'next hop self' options to have boolean values (enabled / disabled) and also values 'ibgp'/ 'ebgp' to restrict it to routes received from IBGP / EBGP. This allows to have it enabled by default in some cases, matches features of other implementations, and allows to handle some strange cases like EBGP border router with 'next hop self' also doing IBGP route reflecting. Change default of 'next hop keep' to enabled for route servers, and 'ibgp' for route reflectors. Update documentation for these options.
2018-12-16BGP: Better handling of non-matching AFI in nexthopsOndrej Zajicek (work)
2018-12-14Doc: Rename code documentation files back to DocOndrej Zajicek (work)
2018-12-12BGP: Do not prepend ASN in export from non-RS EBGP to RS EBGPOndrej Zajicek (work)
When route is exported to regular EBGP, local ASN should be prepended to AS_PATH. When route is propagated by route server (between RS-marked EBGP peers), it should not change AS_PATH. Question is what to do in other cases (from non-RS EBGP, IBGP, or locally originated to RS EBGP). In 1.6.x, we did not prepend ASN in non-RS EBGP or IBGP to RS EBGP, but we prepended in local to RS EBGP. In 2.0.x, we changed that so only RS-EBGP to RS-EBGP is not prepended. We received some negative responses (thanks to heisenbug and Alexander Zubkov), we decided to change it back. One reason is that it is simple to modify the AS_PATH by filters, but not possible to un-modify changes done by BGP itself. Also, as 1.6.x behavior was not really consistent, the final behavior is that ASN is never prepended when exported to RS EBGP, like to IBGP. Note that i do not express an opinion about whether such configurations are even reasonable.
2018-12-12Update RFC referencesOndrej Zajicek (work)
Progdoc comments do not allow SGML tags
2018-12-12BGP: implement Adj-RIB-InOndrej Zajicek (work)
The patch implements optional internal import table to a channel and hooks it to BGP so it can be used as Adj-RIB-In. When enabled, all received (pre-filtered) routes are stored there and import filters can be re-evaluated without explicit route refresh. An import table can be examined using e.g. 'show route import table bgp1.ipv4'.
2018-12-11Nest: Forbid adding channels during reconfigurationOndrej Zajicek (work)
When a new channel is found during reconfiguration, do force restart of the protocol, like with any other un-reconfigurable change. The old behavior was that the new channel was added but remained in down state, even if the protocol was up, so a manual protocol restart was often necessary. In the future this should be improved such that a reconfigurable channel addition (e.g. direct) is accepted and channel is started, while an un-reconfigurable addition forces protocol restart.
2018-12-04Terminology cleanup: The import_control hook is now called preexport.Jan Maria Matejka
Once upon a time, far far away, there were the old Bird developers discussing what direction of route flow shall be called import and export. They decided to say "import to protocol" and "export to table" when speaking about a protocol. When speaking about a table, they spoke about "importing to table" and "exporting to protocol". The latter terminology was adopted in configuration, then also the bird CLI in commit ea2ae6dd0 started to use it (in year 2009). Now it's 2018 and the terminology is the latter. Import is from protocol to table, export is from table to protocol. Anyway, there was still an import_control hook which executed right before route export. One thing is funny. There are two commits in April 1999 with just two minutes between them. The older announces the final settlement on config terminology, the newer uses the other definition. Let's see their commit messages as the git-log tool shows them (the newer first): commit 9e0e485e50ea74c4f1c5cb65bdfe6ce819c2cee2 Author: Martin Mares <mj@ucw.cz> Date: Mon Apr 5 20:17:59 1999 +0000 Added some new protocol hooks (look at the comments for better explanation): make_tmp_attrs Convert inline attributes to ea_list store_tmp_attrs Convert ea_list to inline attributes import_control Pre-import decisions commit 5056c559c4eb253a4eee10cf35b694faec5265eb Author: Martin Mares <mj@ucw.cz> Date: Mon Apr 5 20:15:31 1999 +0000 Changed syntax of attaching filters to protocols to hopefully the final version: EXPORT <filter-spec> for outbound routes (i.e., those announced by BIRD to the rest of the world). IMPORT <filter-spec> for inbound routes (i.e., those imported by BIRD from the rest of the world). where <filter-spec> is one of: ALL pass all routes NONE drop all routes FILTER <name> use named filter FILTER { <filter> } use explicitly defined filter For all protocols, the default is IMPORT ALL, EXPORT NONE. This includes the kernel protocol, so that you need to add EXPORT ALL to get the previous configuration of kernel syncer (as usually, see doc/bird.conf.example for a bird.conf example :)). Let's say RIP to this almost 19-years-old inconsistency. For now, if you import a route, it is always from protocol to table. If you export a route, it is always from table to protocol. And they lived happily ever after.
2018-11-20The MRT protocolOndrej Zajicek (work)
The new MRT protocol is responsible for periodic RIB table dumps in the MRT format (RFC 6396). Also the existing code for BGP4MP MRT dumps is refactored and splitted between BGP to MRT protocols, will be more integrated into MRT in the future. Example: protocol mrt { table "*"; filename "%N_%F_%T.mrt"; period 60; } It is partially based on the old MRT code from Pavel Tvrdik.
2018-10-26BGP: Fix VRF for listening socketOndrej Zajicek (work)
Listening socket should be bound to specified interface and VRF. Thanks to Alexander Zubkov for the bugreport.