-
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 ipv4-mapped ipv6 use cases #17019
base: master
Are you sure you want to change the base?
Commits on Oct 17, 2024
-
bgpd: optimize bgp_interface_address_add
Move common checks outside of the loop. Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
Configuration menu - View commit details
-
Copy full SHA for c768996 - Browse repository at this point
Copy the full SHA c768996View commit details -
bgpd: reduce bgp_interface_address_add indentation
Reduce bgp_interface_address_add indentation Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
Configuration menu - View commit details
-
Copy full SHA for 0c64cc2 - Browse repository at this point
Copy the full SHA 0c64cc2View commit details -
bgpd: log new ipv6 global in bgp_interface_address_add
Log new IPv6 global address in bgp_interface_address_add Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
Configuration menu - View commit details
-
Copy full SHA for 976a0f6 - Browse repository at this point
Copy the full SHA 976a0f6View commit details -
bgpd: fix sending ipv6 local nexthop if global present
bgpd keeps on advertising IPv6 prefixes with a IPv6 link-local nexthop after a valid IPv6 global appears. At bgpd startup, the IPv6 global is announced by zebra after the link-local. Only the link-local is advertised. Clearing the BGP sessions make the global to to be announced. Update the nexthops with the global IPv6 when available. Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
Configuration menu - View commit details
-
Copy full SHA for b3e8e6c - Browse repository at this point
Copy the full SHA b3e8e6cView commit details -
topotests: add an ebgp 6vpe test
This test uses the connected ipv4 mapped ipv6 prefix to resolve the received BGP routes. Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com> Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com> Signed-off-by: François Dumontet <francois.dumontet@6wind.com>
Configuration menu - View commit details
-
Copy full SHA for 3ddb659 - Browse repository at this point
Copy the full SHA 3ddb659View commit details -
topotests: add bgp_nexthop_mp_ipv4_6 test
Add bgp_nexthop_mp_ipv4_6 topotest to test to nexhop value with MP-BGP IPv4 and IPv6 on IPv4 peering. The test has route-reflector, route-server, iBGP and eBGP peers. Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
Configuration menu - View commit details
-
Copy full SHA for 0d87d16 - Browse repository at this point
Copy the full SHA 0d87d16View commit details -
bgpd: optimize bgp_interface_address_del
Move common checks outside of the loop. Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
Configuration menu - View commit details
-
Copy full SHA for 863f47f - Browse repository at this point
Copy the full SHA 863f47fView commit details -
bgpd, tests: fix removing ipv6 global nexthop
When the IPv6 global is removed on an interface towards a peer, the IPv6 nexthop global that is sent is a IPv4-mapped IPv6 address. It should be the link-local. At removal, replace the global by the next global address or the link-local as last resort. Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
Configuration menu - View commit details
-
Copy full SHA for 274784f - Browse repository at this point
Copy the full SHA 274784fView commit details -
bgpd, tests: fix "used" json key on link-local nexthop
When a peer has no IPv6 global address to send as nexthop, it sends the IPv6 link-local instead as global. "show bgp ipv6 json" displays the same address in global and link-local scopes. > "nexthops": [ > { > "ip": "fe80::a495:38ff:fea6:6ea3", > "afi": "ipv6", > "scope": "global", > "used": true > }, > { > "ip": "fe80::a495:38ff:fea6:6ea3", > "afi": "ipv6", > "scope": "link-local" > } > ] However, "used" key is set on the global nexthop but not in link-local. It is correct but it makes difficult to test JSON to expect the usage of a link-local. The contrary is also correct. Set "used" key on the link-local nexhop instead to facilitate the tests. Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
Configuration menu - View commit details
-
Copy full SHA for 2315e7d - Browse repository at this point
Copy the full SHA 2315e7dView commit details -
bgpd, tests: set ipv4-mapped ipv6 for ipv4 on ipv6
The code was expected that no IPv6 global address was present but the previous commit was replacing nexthop.v6global by the link-local address instead of un-setting it in case of removal of the IPv6 global. Set also ipv4-mapped ipv6 address as nexthop when a link-local is found and it is an ipv4 prefix over ipv6 nexthop. Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
Configuration menu - View commit details
-
Copy full SHA for adcd6cb - Browse repository at this point
Copy the full SHA adcd6cbView commit details -
bgpd: prefer link-local to a ipv4-mapped ipv6 global
When a peer sends an IPv4-mapped IPv6 global and a IPv6 link-local nexthop, prefer the link-local unless a route-map tells to use the global. Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
Configuration menu - View commit details
-
Copy full SHA for 9d6a779 - Browse repository at this point
Copy the full SHA 9d6a779View commit details -
bgpd: replace ipv4-mapped ipv6 at update forwarding
Replace IPv4-mapped IPv6 at update forwarding because the peer may not be able to create a route with the IPv4-mapped IPv6. Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
Configuration menu - View commit details
-
Copy full SHA for 8859327 - Browse repository at this point
Copy the full SHA 8859327View commit details -
topotests: bgp_nexthop_mp_ipv4_6, test ipv4-mapped
Test that a IPv4-mapped IPv6 is sent from a peer that has no global IPv6 address. Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
Configuration menu - View commit details
-
Copy full SHA for 7f99625 - Browse repository at this point
Copy the full SHA 7f99625View commit details