Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tools: Fix frr-reload for ebgp-multihop TTL reconfiguration. (backport #17946) #17950

Merged
merged 1 commit into from
Jan 29, 2025

Conversation

mergify[bot]
Copy link

@mergify mergify bot commented Jan 29, 2025

In ebgp-multihop, there is a difference in reload behavior when TTL is unspecified (meaning default 255) and when 255 is explicitly specified. For example, when reloading with 'neighbor ebgp-multihop 255' in the config, the following difference is created. This commit fixes that.

Lines To Delete
===============
router bgp 65001
 no neighbor 10.0.0.4 ebgp-multihop
exit

Lines To Add
============
router bgp 65001
 neighbor 10.0.0.4 ebgp-multihop 255
exit

The commit 767aaa3 is not sufficient and frr-reload needs to be fixed to handle both unspecified and specified cases.


How to reproduce the issue on master branch

cat <<EOF > /etc/frr/frr.conf
router bgp 65001
 bgp router-id 10.0.0.1
 neighbor 10.0.0.4 remote-as 65002
 neighbor 10.0.0.4 ebgp-multihop 255
exit
!
end
EOF

systemctl start frr
./tools/frr-reload.py --debug --test /etc/frr/frr.conf

These commands above shows the diff as below:

Lines To Delete
===============
router bgp 65001
 no neighbor 10.0.0.4 ebgp-multihop
exit

Lines To Add
============
router bgp 65001
 neighbor 10.0.0.4 ebgp-multihop 255
exit
```<hr>This is an automatic backport of pull request #17946 done by [Mergify](https://mergify.com).

In ebgp-multihop, there is a difference in reload behavior when TTL is
unspecified (meaning default 255) and when 255 is explicitly specified.
For example, when reloading with 'neighbor <neighbor> ebgp-multihop
255' in the config, the following difference is created. This commit
fixes that.

    Lines To Delete
    ===============
    router bgp 65001
     no neighbor 10.0.0.4 ebgp-multihop
    exit

    Lines To Add
    ============
    router bgp 65001
     neighbor 10.0.0.4 ebgp-multihop 255
    exit

The commit 767aaa3 is not sufficient and frr-reload needs to be
fixed to handle both unspecified and specified cases.

Signed-off-by: Nobuhiro MIKI <[email protected]>
(cherry picked from commit 594e917)
@frrbot frrbot bot added the tools label Jan 29, 2025
@ton31337 ton31337 merged commit 86102ac into stable/10.1 Jan 29, 2025
14 checks passed
@ton31337 ton31337 deleted the mergify/bp/stable/10.1/pr-17946 branch January 29, 2025 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants