summaryrefslogtreecommitdiff
path: root/bgpd/bgp_updgrp.h
AgeCommit message (Collapse)Author
2025-01-14bgpd: remove unused BATTR_REFLECTED for rmap_change_flagsEnke Chen
Remove unused BATTR_REFLECTED for rmap_change_flags. Signed-off-by: Enke Chen <enchen@paloaltonetworks.com>
2024-03-20bgpd: Drop periodic merge check functionsDonatas Abraitis
Not used anymore. There is triggered merge check, not periodic. Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-03-13bgpd: Ensure community data is freed in some cases.Donald Sharp
Customer has this valgrind trace: Direct leak of 2829120 byte(s) in 70728 object(s) allocated from: 0 in community_new ../bgpd/bgp_community.c:39 1 in community_uniq_sort ../bgpd/bgp_community.c:170 2 in route_set_community ../bgpd/bgp_routemap.c:2342 3 in route_map_apply_ext ../lib/routemap.c:2673 4 in subgroup_announce_check ../bgpd/bgp_route.c:2367 5 in subgroup_process_announce_selected ../bgpd/bgp_route.c:2914 6 in group_announce_route_walkcb ../bgpd/bgp_updgrp_adv.c:199 7 in hash_walk ../lib/hash.c:285 8 in update_group_af_walk ../bgpd/bgp_updgrp.c:2061 9 in group_announce_route ../bgpd/bgp_updgrp_adv.c:1059 10 in bgp_process_main_one ../bgpd/bgp_route.c:3221 11 in bgp_process_wq ../bgpd/bgp_route.c:3221 12 in work_queue_run ../lib/workqueue.c:282 The above leak detected by valgrind was from a screenshot so I copied it by hand. Any mistakes in line numbers are purely from my transcription. Additionally this is against a slightly modified 8.5.1 version of FRR. Code inspection of 8.5.1 -vs- latest master shows the same problem exists. Code should be able to be followed from there to here. What is happening: There is a route-map being applied that modifes the outgoing community to a peer. This is saved in the attr copy created in subgroup_process_announce_selected. This community pointer is not interned. So the community->refcount is still 0. Normally when a prefix is announced, the attr and the prefix are placed on a adjency out structure where the attribute is interned. This will cause the community to be saved in the community hash list as well. In a non-normal operation when the decision to send is aborted after the route-map application, the attribute is just dropped and the pointer to the community is just dropped too, leading to situations where the memory is leaked. The usage of bgp suppress-fib would would be a case where the community is caused to be leaked. Additionally the previous commit where an unsuppress-map is used to modify the outgoing attribute but since unsuppress-map was not considered part of outgoing policy the attribute would be dropped as well. This pointer drop also extends to any dynamically allocated memory saved by the attribute pointer that was not interned yet as well. So let's modify the return case where the decision is made to not send the prefix to the peer to always just flush the attribute to ensure memory is not leaked. Fixes: #15459 Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-02-07bgpd: Add `neighbor X send-community extended rpki` commandDonatas Abraitis
By default, iBGP and eBGP-OAD peers exchange RPKI extended community by default. Add a command to disable sending RPKI extended community if needed. Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-12-08bgpd: Convert variable `withdraw` integer to boolDonatas Abraitis
It holds only 0/1. Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-07-21bgpd: Remove withdraw_low from system, it is never usedDonald Sharp
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-07-07bgpd: Deprecate Prestandard Outbound Route Filtering capabilityDonatas Abraitis
https://www.rfc-editor.org/rfc/rfc8810.html Not relevant anymore. Use RFC'd version of ORF. Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-03-24*: Rename `struct thread` to `struct event`Donald Sharp
Effectively a massive search and replace of `struct thread` to `struct event`. Using the term `thread` gives people the thought that this event system is a pthread when it is not Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-02-09*: auto-convert to SPDX License IDsDavid Lamparter
Done with a combination of regex'ing and banging my head against a wall. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-12-06bgpd: Adopt addpath functionality for labeled-unicastDonatas Abraitis
The same as for RIB, labeled-unicast allocations should live in unicast space. Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-11-23bgpd: JSON support for show ip bgp vrf all update-groupAshwini Reddy
Ticket:#3229030 Testing Done: UT Changes: - JSON support for the update group command. Testing: torc-11# show ip bgp vrf all ipv6 update-groups json torc-12# show bgp vrf all update-groups json { "default":{ "2":{ "groupCreateTime":{ "epoch":1669225617, "epochString":"Wed Nov 23 17:46:57 2022\n" }, "afi":"IPv6", "safi":"unicast", "outRouteMap":"MY_ORIGIN_ASPATH_ONLY", "minRouteAdvInt":0, "subGroup":[ { "subGroupId":2, "groupCreateTime":{ "epoch":1669225617, "epochString":"Wed Nov 23 17:46:57 2022\n" }, "statistics":{ "joinEvents":2, "pruneEvents":0, "mergeEvents":0, "splitEvents":0, "switchEvents":0, "peerRefreshEvents":0, "mergeCheckEvents":2 }, "coalesceTime":1100, "version":12, "packetQueueInfo":{ "qeueueLen":0, "queuedTotal":1, "queueHwmLen":1, "totalEnqueued":1 }, "adjListCount":1, "needsRefresh":false, "peers":[ "uplink_1", "uplink_2" ] } ] } } } { "sym_3":{ } } { "sym_5":{ } } { "sym_2":{ } } { "sym_4":{ } } { "sym_1":{ } } Co-authored-by: Chirag Shah <chirag@nvidia.com> Signed-off-by: Ashwini Reddy <ashred@nvidia.com>
2022-11-18bgpd: Allow overriding MPLS VPN next-hops via route-mapsDonatas Abraitis
Just do not reset next-hop for MPLS VPN routes. Example of 172.16.255.1/32 (using extended next-hop capability): ``` pe2# sh bgp ipv4 vpn BGP table version is 4, local router ID is 10.10.10.20, vrf id 0 Default local pref 100, local AS 65001 Status codes: s suppressed, d damped, h history, * valid, > best, = multipath, i internal, r RIB-failure, S Stale, R Removed Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self Origin codes: i - IGP, e - EGP, ? - incomplete RPKI validation codes: V valid, I invalid, N Not found Network Next Hop Metric LocPrf Weight Path Route Distinguisher: 192.168.1.2:2 *>i10.0.0.0/24 2001:db8:1::1 0 100 0 65000 ? UN=2001:db8:1::1 EC{192.168.1.2:2} label=1111 type=bgp, subtype=0 *>i172.16.255.1/32 2001:db8::1 0 100 0 65000 ? UN=2001:db8::1 EC{192.168.1.2:2} label=1111 type=bgp, subtype=0 *>i192.168.1.0/24 2001:db8:1::1 0 100 0 65000 ? UN=2001:db8:1::1 EC{192.168.1.2:2} label=1111 type=bgp, subtype=0 *>i192.168.2.0/24 2001:db8:1::1 100 0 65000 ? UN=2001:db8:1::1 EC{192.168.1.2:2} label=1111 type=bgp, subtype=0 Route Distinguisher: 192.168.2.2:2 *> 10.0.0.0/24 192.168.2.1@4< 0 50 0 65000 ? UN=192.168.2.1 EC{192.168.2.2:2} label=2222 type=bgp, subtype=5 *> 172.16.255.1/32 192.168.2.1@4< 50 0 65000 ? UN=192.168.2.1 EC{192.168.2.2:2} label=2222 type=bgp, subtype=5 *> 192.168.1.0/24 192.168.2.1@4< 50 0 65000 ? UN=192.168.2.1 EC{192.168.2.2:2} label=2222 type=bgp, subtype=5 *> 192.168.2.0/24 192.168.2.1@4< 0 50 0 65000 ? UN=192.168.2.1 EC{192.168.2.2:2} label=2222 type=bgp, subtype=5 Displayed 8 routes and 8 total paths ``` Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-08-05bgpd: Send route update when modifying access/aspath/prefix listsDonatas Abraitis
Handle ORF REMOVE_ALL events as well, because now we just silently return, and a stale dynamic prefix-list is used instead of the new one. Before this, soft clear/route refresh was needed. Don't know the reason, but we didn't send updates when modifying the filters. Probably due to a massive change of filters and to avoid automatic updates :/ Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-07-06bgpd: Inconsistencies in SNT counters with default-originateIqra Siddiqui
Description: Change is intended for fixing the inconsistencies present while adjusting the SNT counters with default originate. - SNT counter gets incremented on every change of policy associated with default-originate, leading to inconsistencies. - This fix has been added to ensure that the SNT counters gets incremented and decremented only once during the creation and deletion workflow of default-originate, and prevents incrementing the counter during update flow. Co-authored-by: Abhinay Ramesh <rabhinay@vmware.com> Signed-off-by: Iqra Siddiqui <imujeebsiddi@vmware.com>
2022-04-12bgpd: Apply frrbot stylingDonatas Abraitis
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-04-12bgpd: Convert bpacket_attr_vec_type to enumDonatas Abraitis
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-04-12bgpd: Convert bgp_policy_type_e to enumDonatas Abraitis
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-02-23*: Change thread->func to return void instead of intDonald Sharp
The int return value is never used. Modify the code base to just return a void instead. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-02-01bgpd: Add bgp_check_selected() helper for abstractionDonatas Abraitis
Just check if the path is selected to be advertised: best path or addpath capable. Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2022-02-01bgpd: Convert bgp_addpath_encode_[tr]x() to bool from intDonatas Abraitis
Rename addpath_encode[d] to addpath_capable to be consistent. Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2022-01-20bgpd: apply maximum-prefix-out without clearing the neighborLouis Scalbert
Abstract: - The command "neighbor PEER maximum-prefix-out NUMBER" cannot be applied without clearing the BGP neighbor. - Apply the maximum-prefix-out value as soon as it is modified without clearing the neighbor. subgroup_update_packet() and subgroup_withdraw_packet() respectively manages the announcement and withdrawal BGP message to the peer. subgrp->scount counter counts the number of sent prefixes. Before the patch, the maximum out prefix limitation was applied in subgroup_update_packet() in order that subgrp->scount never exceeds the limit. Setting a limit inferior to the effective number of sent prefix did not result in sending any withdrawal message to reduce the number of sent prefixes. Without clearing the BGP neighbor, the limitation only applied to the announcement of new prefixes when the limitation was over. With the patch, the limitation is checked in subgroup_announce_check(). The function is intended to say whether a prefix has to be announced in regards to the prefix-list, route-map... Now when a maximum-prefix-out value is changed/removed, the neighbor AFI/SAFI table is re-parsed in the same way as for the application of route-map, prefix-lists... Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2021-01-28bgpd: Remove #if 0 codeDonald Sharp
Remove all dead #if 0 code from bgpd. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2020-12-11bgpd: Do not send BGP UPDATE if the route actually not changedDonatas Abraitis
Reference: https://www.cmand.org/communityexploration --y2-- / | \ c1 ---- x1 ---- y1 | z1 \ | / --y3-- 1. z1 announces 192.168.255.254/32 to y2, y3. 2. y2 and y3 tags this prefix at ingress with appropriate communities 65004:2 (y2) and 65004:3 (y3). 3. x1 filters all communities at the egress to c1. 4. Shutdown the link between y1 and y2. 5. y1 will generate a BGP UPDATE message regarding the next-hop change. 6. x1 will generate a BGP UPDATE message regarding community change. To avoid sending duplicate BGP UPDATE messages we should make sure we send only actual route updates. In this example, x1 will skip BGP UPDATE to c1 because the actual route is the same (filtered communities - nothing changes). Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2020-06-23bgp: rename bgp_node to bgp_destDonald Sharp
This is the bulk part extracted from "bgpd: Convert from `struct bgp_node` to `struct bgp_dest`". It should not result in any functional change. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2020-03-21bgpd: Convert lots of int type functions to bool/voidDonatas Abraitis
Some were converted to bool, where true/false status is needed. Converted to void only those, where the return status was only false or true. Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2020-01-17bgpd: Add an option to limit outgoing prefixesDonatas Abraitis
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2019-05-18bgpd : no neighbor <> send-community large is not working dynamicallyvishaldhingra
updgrp_hash_key_make() uses the PEER_UPDGRP_AF_FLAGS for the key. PEER_UPDGRP_AF_FLAGS contains the neigbor flags. If user do no neighbor <> send community large, then the hash key does not change and BGP does not send update for large community change. Added the PEER_FLAG_SEND_LARGE_COMMUNITY in PEER_UPDGRP_AF_FLAGS. After this the hash key gets changed and update will be processed with large community. Signed-off-by: vishaldhingra<vdhingra@vmware.com>
2019-04-27bgpd: replace ADV_FIFO with DECLARE_LISTDavid Lamparter
The FIFO_* stuff in lib/fifo.h is no different from a simple unsorted list. Just use DECLARE_LIST here so we can get rid of FIFO_*. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2018-11-10bgpd: Re-use TX Addpath IDs where possibleMitch Skiba
The motivation for this patch is to address a concerning behavior of tx-addpath-bestpath-per-AS. Prior to this patch, all paths' TX ID was pre-determined as the path was received from a peer. However, this meant that any time the path selected as best from an AS changed, bgpd had no choice but to withdraw the previous best path, and advertise the new best-path under a new TX ID. This could cause significant network disruption, especially for the subset of prefixes coming from only one AS that were also communicated over a bestpath-per-AS session. The patch's general approach is best illustrated by txaddpath_update_ids. After a bestpath run (required for best-per-AS to know what will and will not be sent as addpaths) ID numbers will be stripped from paths that no longer need to be sent, and held in a pool. Then, paths that will be sent as addpaths and do not already have ID numbers will allocate new ID numbers, pulling first from that pool. Finally, anything left in the pool will be returned to the allocator. In order for this to work, ID numbers had to be split by strategy. The tx-addpath-All strategy would keep every ID number "in use" constantly, preventing IDs from being transferred to different paths. Rather than create two variables for ID, this patch create a more generic array that will easily enable more addpath strategies to be implemented. The previously described ID manipulations will happen per addpath strategy, and will only be run for strategies that are enabled on at least one peer. Finally, the ID numbers are allocated from an allocator that tracks per AFI/SAFI/Addpath Strategy which IDs are in use. Though it would be very improbable, there was the possibility with the free-running counter approach for rollover to cause two paths on the same prefix to get assigned the same TX ID. As remote as the possibility is, we prefer to not leave it to chance. This ID re-use method is not perfect. In some cases you could still get withdraw-then-add behaviors where not strictly necessary. In the case of bestpath-per-AS this requires one AS to advertise a prefix for the first time, then a second AS withdraws that prefix, all within the space of an already pending MRAI timer. In those situations a withdraw-then-add is more forgivable, and fixing it would probably require a much more significant effort, as IDs would need to be moved to ADVs instead of paths. Signed-off-by Mitchell Skiba <mskiba@amazon.com>
2018-10-09bgpd: Rename various variable names to something more appropriateDonald Sharp
ri -> pi bi -> bpi info -> path info -> rmap_path ( for routemap applications ) Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-10-09bgpd: Convert binfo to pathDonald Sharp
Convert the binfo variable to path. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-10-09bgpd: Convert `struct bgp_info` to `struct bgp_path_info`Donald Sharp
Do a straight conversion of `struct bgp_info` to `struct bgp_path_info`. This commit will setup the rename of variables as well. This is being done because `struct bgp_info` is not descriptive of what this data actually is. It is path information for routes that we keep to build the actual routes nexthops plus some extra information. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-03-27*: use C99 standard fixed-width integer typesQuentin Young
The following types are nonstandard: - u_char - u_short - u_int - u_long - u_int8_t - u_int16_t - u_int32_t Replace them with the C99 standard types: - uint8_t - unsigned short - unsigned int - unsigned long - uint8_t - uint16_t - uint32_t Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-03-06*: conform with COMMUNITY.md formatting rules, via 'make indent'Lou Berger
Signed-off-by: Lou Berger <lberger@labn.net>
2017-11-30bgpd: intelligently adjust coalesce timerQuentin Young
The subgroup coalesce timer controls how long updates to a particular subgroup are delayed in order to allow additional peers to join the subgroup. Presently the timer value is 200 ms. Increase it to 1 second and adjust up as peers are configured, with an upper cap at 10s. This cuts convergence time by a factor of 3 at large scale (300+ peers, 1000+ prefixes per peer). Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2017-11-30bgpd: re-add update-group write triggersQuentin Young
Removed in earlier version where the I/O pthread busy-waited for packets to be posted to an output queue. Now that it's poll()-based, it's necessary once again. Although this time we can say what we're actually doing instead of a side effect of a write job. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2017-11-30bgpd: implement buffered readsQuentin Young
* Move and modify all network input related code to bgp_io.c * Add a real input buffer to `struct peer` * Move connection initialization to its own thread.c task instead of piggybacking off of bgp_read() * Tons of little fixups Primary changes are in bgp_packet.[ch], bgp_io.[ch], bgp_fsm.[ch]. Changes made elsewhere are almost exclusively refactoring peer->ibuf to peer->curr since peer->ibuf is now the true FIFO packet input buffer while peer->curr represents the packet currently being processed by the main pthread. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2017-11-30bgpd: move packet writes into dedicated pthreadQuentin Young
* BGP_WRITE_ON() removed * BGP_WRITE_OFF() removed * peer_writes_on() added * peer_writes_off() added * bgp_write_proceed_actions() removed Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2017-07-22Revert "*: reindent pt. 2"David Lamparter
This reverts commit c14777c6bfd0a446c85243d3a9835054a259c276. clang 5 is not widely available enough for people to indent with. This is particularly problematic when rebasing/adjusting branches. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-07-17*: reindent pt. 2whitespace / reindent
w/ clang 5 * reflow comments * struct members go 1 per line * binpack algo was adjusted
2017-07-17*: reindentreindent-master-afterwhitespace / reindent
indent.py `git ls-files | pcregrep '\.[ch]$' | pcregrep -v '^(ldpd|babeld|nhrpd)/'` Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-05-15*: make consistent & update GPLv2 file headersDavid Lamparter
The FSF's address changed, and we had a mixture of comment styles for the GPL file header. (The style with * at the beginning won out with 580 to 141 in existing files.) Note: I've intentionally left intact other "variations" of the copyright header, e.g. whether it says "Zebra", "Quagga", "FRR", or nothing. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-03-08lib: hide away logging internalsDavid Lamparter
... no need to have struct zlog generally-exposed. A few files get to include log_int.h because they use zlog/vzlog. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2016-08-24bgpd: fix build on SolarisRenato Westphal
* Solaris doesn't have u_int64_t, so use uint64_t instead. C99-style fixed-width integers should always be preferred to improve portability; * 's_addr' is a macro on Solaris, so we can't use it as a variable name. Rename the 's_addr' variable to 'addr' in the bgp_peer_conf_if_to_su_update_v4() function. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2016-01-22BGP: Rework iteration of peer_af_arrayvivek
While processing references to the macro PEERAF_FOREACH(), aggressive loop optimization by gcc 4.9.x (probably 4.8 and greater) was resulting in the generated code not checking on the index as well as eliminating some code. This was leading to a dereference of invalid memory when a BGP peer came up. The fix is to scrap this convoluted macro. Two other changes done are to eliminate overloading of "afindex" and make the loop iterator an integer. Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com> Reviewed-by: Dave Olson <olson@cumulusnetworks.com> Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com> Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com> Ticket: CM-8889 Reviewed By: CCR-4018 Testing Done: Verified failure scenario Note: This code was added as part of update-groups implementation; when upstreaming update-groups, this patch should also be included.
2015-12-08BGP: update-group needs to consider addpath capability flagsDaniel Walton
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com> Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com> Ticket: CM-8475
2015-11-10BGP: route-server will now use addpath...chop the _rsclient codeDaniel Walton
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com> Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com> Ticket: CM-8122 per draft-ietf-idr-ix-bgp-route-server-09: 2.3.2.2.2. BGP ADD-PATH Approach The [I-D.ietf-idr-add-paths] Internet draft proposes a different approach to multiple path propagation, by allowing a BGP speaker to forward multiple paths for the same prefix on a single BGP session. As [RFC4271] specifies that a BGP listener must implement an implicit withdraw when it receives an UPDATE message for a prefix which already exists in its Adj-RIB-In, this approach requires explicit support for the feature both on the route server and on its clients. If the ADD-PATH capability is negotiated bidirectionally between the route server and a route server client, and the route server client propagates multiple paths for the same prefix to the route server, then this could potentially cause the propagation of inactive, invalid or suboptimal paths to the route server, thereby causing loss of reachability to other route server clients. For this reason, ADD- PATH implementations on a route server should enforce send-only mode with the route server clients, which would result in negotiating receive-only mode from the client to the route server. This allows us to delete all of the following code: - All XXXX_rsclient() functions - peer->rib - BGP_TABLE_MAIN and BGP_TABLE_RSCLIENT - RMAP_IMPORT and RMAP_EXPORT
2015-11-06BGP: Implement "neighbor x.x.x.x addpath-tx-bestpath-per-AS"Daniel Walton
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com> Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com> Ticket: CM-8114
2015-11-05BGP: support for addpath TXDaniel Walton
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com> Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com> Reviewed-by: Vivek Venkataraman <vivek@cumulusnetworks.com Ticket: CM-8014 This implements addpath TX with the first feature to use it being "neighbor x.x.x.x addpath-tx-all-paths". One change to show output is 'show ip bgp x.x.x.x'. If no addpath-tx features are configured for any peers then everything looks the same as it is today in that "Advertised to" is at the top and refers to which peers the bestpath was advertise to. root@superm-redxp-05[quagga-stash5]# vtysh -c 'show ip bgp 1.1.1.1' BGP routing table entry for 1.1.1.1/32 Paths: (6 available, best #6, table Default-IP-Routing-Table) Advertised to non peer-group peers: r1(10.0.0.1) r2(10.0.0.2) r3(10.0.0.3) r4(10.0.0.4) r5(10.0.0.5) r6(10.0.0.6) r8(10.0.0.8) Local, (Received from a RR-client) 12.12.12.12 (metric 20) from r2(10.0.0.2) (10.0.0.2) Origin IGP, metric 0, localpref 100, valid, internal AddPath ID: RX 0, TX 8 Last update: Fri Oct 30 18:26:44 2015 [snip] but once you enable an addpath feature we must display "Advertised to" on a path-by-path basis: superm-redxp-05# show ip bgp 1.1.1.1/32 BGP routing table entry for 1.1.1.1/32 Paths: (6 available, best #6, table Default-IP-Routing-Table) Local, (Received from a RR-client) 12.12.12.12 (metric 20) from r2(10.0.0.2) (10.0.0.2) Origin IGP, metric 0, localpref 100, valid, internal AddPath ID: RX 0, TX 8 Advertised to: r8(10.0.0.8) Last update: Fri Oct 30 18:26:44 2015 Local, (Received from a RR-client) 34.34.34.34 (metric 20) from r3(10.0.0.3) (10.0.0.3) Origin IGP, metric 0, localpref 100, valid, internal AddPath ID: RX 0, TX 7 Advertised to: r8(10.0.0.8) Last update: Fri Oct 30 18:26:39 2015 Local, (Received from a RR-client) 56.56.56.56 (metric 20) from r6(10.0.0.6) (10.0.0.6) Origin IGP, metric 0, localpref 100, valid, internal AddPath ID: RX 0, TX 6 Advertised to: r8(10.0.0.8) Last update: Fri Oct 30 18:26:39 2015 Local, (Received from a RR-client) 56.56.56.56 (metric 20) from r5(10.0.0.5) (10.0.0.5) Origin IGP, metric 0, localpref 100, valid, internal AddPath ID: RX 0, TX 5 Advertised to: r8(10.0.0.8) Last update: Fri Oct 30 18:26:39 2015 Local, (Received from a RR-client) 34.34.34.34 (metric 20) from r4(10.0.0.4) (10.0.0.4) Origin IGP, metric 0, localpref 100, valid, internal AddPath ID: RX 0, TX 4 Advertised to: r8(10.0.0.8) Last update: Fri Oct 30 18:26:39 2015 Local, (Received from a RR-client) 12.12.12.12 (metric 20) from r1(10.0.0.1) (10.0.0.1) Origin IGP, metric 0, localpref 100, valid, internal, best AddPath ID: RX 0, TX 3 Advertised to: r1(10.0.0.1) r2(10.0.0.2) r3(10.0.0.3) r4(10.0.0.4) r5(10.0.0.5) r6(10.0.0.6) r8(10.0.0.8) Last update: Fri Oct 30 18:26:34 2015 superm-redxp-05#
2015-10-28BGP: peer-group restrictions should be relaxed, update-groups determine ↵Daniel Walton
outbound policy anyway Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com> Reviewed-by: Vivek Venkataraman <vivek@cumulusnetworks.com> Ticket: CM-7933