-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
bgpd: Fix BGP to update correct v6 next-hop globally #15919
Conversation
Issue: In a dual-stack IPv4/IPv6 BGP session, after the interface is deactivated (ifdown) and then reloaded (ifreload), the global next-hop within BGP is incorrectly updated. Currently, only unnumbered neighbors are handled. We also need to handle an IPv4 neighbor when IPv6 AFI-SAFI is enabled. Fix: When the primary global v6 unicast address is received from Zebra, BGP updates the peer's global next-hop with the correct address and send update to its negibors. Testing: UT, and TestEbgpMultihop tests UT logs: with fix: root@cumulus:mgmt:/tmp# ifdown swp1s0; ifreload -a root@:mgmt:/tmp# vtysh -c "show ip bgp vrf all neighbors" | grep Nexthop Nexthop: 20.1.2.101 Nexthop global: 2001:10:1:2::101 Nexthop local: fe80::7efe:90ff:fefa:e158 without fix after ifreload: Nexthop: 20.1.2.101 Nexthop global: :: Nexthop local: fe80::7efe:90ff:fefa:e158 Ticket: #3870831 Signed-off-by: Rajesh Varatharaj <[email protected]> and Pooja Doijode [email protected]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please fix the Signed-off
tag, to be two separate tags, instead of as it is for now.
link_if = NULL; | ||
char ip_buf[ETHER_ADDR_STRLEN]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please move this above link_if
and a newline after variables (same is suggested by frrbot/verify check).
if (IS_ZEBRA_DEBUG_KERNEL) | ||
zlog_debug( | ||
" Neighbor Entry received is not on a VLAN or a BRIDGE, ignoring"); | ||
" Neighbor Entry IF %s(%u) and IP %s is not on a VLAN or BRIDGE, ignoring", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: and IP
can it be one whitespace?
@Mergifyio backport stable/10.0 |
🟠 Waiting for conditions to match
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good other than @ton31337 's comments ...
@routingrocks could you rebase? |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
Normally, the issue is fixed by #15614, which is now merged |
@frrbot autoclose in 1 month |
Issue:
In a dual-stack IPv4/IPv6 BGP session, after the interface is deactivated (ifdown) and then reloaded (ifreload), the global next-hop within BGP is incorrectly updated. Currently, only unnumbered neighbors are handled.
We also need to handle an IPv4 neighbor when IPv6 AFI-SAFI is enabled.
Fix:
When the primary global v6 unicast address is received from Zebra, BGP updates the peer's global next-hop with the correct address and send update to its negibors.
Testing: UT, and TestEbgpMultihop tests
UT logs:
with fix:
root@:mgmt:/tmp# ifdown swp1s0; ifreload -a root@:mgmt:/tmp# vtysh -c "show ip bgp vrf all neighbors" | grep Nexthop Nexthop: 20.1.2.101
Nexthop global: 2001:10:1:2::101
Nexthop local: fe80::7efe:90ff:fefa:e158
without fix after ifreload:
Nexthop: 20.1.2.101
Nexthop global: ::
Nexthop local: fe80::7efe:90ff:fefa:e158
Ticket: #
Signed-off-by: Rajesh Varatharaj [email protected] and Pooja Doijode [email protected]