]> git.puffer.fish Git - matthieu/frr.git/commit
bgpd: skip reset when removing dup update-source
authorTrey Aspelund <taspelund@nvidia.com>
Mon, 24 Jul 2023 20:16:08 +0000 (20:16 +0000)
committerTrey Aspelund <taspelund@nvidia.com>
Fri, 28 Jul 2023 16:34:55 +0000 (16:34 +0000)
commit62a452c47fd328db450923c13ed9c180d6938e10
tree9fbdf4241543b0d0d18d8497fcff71df72ffbb0a
parent49e9bb281985c0df4ecadf8b61f8ed37862eed52
bgpd: skip reset when removing dup update-source

When 'no neighbor .. update-source' is issued for a regular peer, that
peer is always reset.  This is unnecessary if the peer is a member of a
peer-group and it inherits an identical update-source, so let's skip
the reset/Notification for that condition.

Config:
------------
router bgp 1
 neighbor PG peer-group
 neighbor PG remote-as internal
 neighbor PG update-source 100.64.0.3
 neighbor 192.168.122.99 peer-group PG
 neighbor 192.168.122.99 update-source 100.64.0.3

Before:
------------
ub20-2(config-router)# do show ip bgp sum | include .99
192.168.122.99  4          1        36        34        0    0    0 00:00:17            0        0 N/A
ub20-2(config-router)# do show ip bgp neighbors 192.168.122.99 | include Local host
Local host: 100.64.0.3, Local port: 46083
ub20-2(config-router)# no neighbor 192.168.122.99 update-source
ub20-2(config-router)# do show ip bgp sum | include .99
192.168.122.99  4          1        36        35        0    0    0 00:00:01         Idle        0 N/A
ub20-2(config-router)# do show ip bgp neighbors 192.168.122.99 | include Local host
Local host: 100.64.0.3, Local port: 39847

After:
------------
ub20-2(config-router)# do show ip bgp sum | include .99
192.168.122.99  4          1         3         3        0    0    0 00:00:20            0        0 N/A
ub20-2(config-router)# do show ip bgp neighbors 192.168.122.99 | include Local host
Local host: 100.64.0.3, Local port: 39415
ub20-2(config-router)# no neighbor 192.168.122.99 update-source
ub20-2(config-router)# do show ip bgp sum | include .99
192.168.122.99  4          1         3         3        0    0    0 00:00:28            0        0 N/A
ub20-2(config-router)# do show ip bgp neighbors 192.168.122.99 | include Local host
Local host: 100.64.0.3, Local port: 39415

Signed-off-by: Trey Aspelund <taspelund@nvidia.com>
bgpd/bgpd.c