diff options
| author | Louis Scalbert <louis.scalbert@6wind.com> | 2024-07-22 10:57:21 +0200 |
|---|---|---|
| committer | Louis Scalbert <louis.scalbert@6wind.com> | 2024-07-24 10:17:42 +0200 |
| commit | 15fb7209eede6226bbe15a9618a8d06b88d44a08 (patch) | |
| tree | b7484471351587188ce717e8032ffb906d001d88 /lib/debug.h | |
| parent | aa9d66e922e2a232b2fd89b87d8cb7409ae82dc1 (diff) | |
bgpd: fix ipv4-mapped ipv6 for ipv6 over ipv4 peer
When IPv6 prefixes are sent over an IPv4 session, the UPDATE is sent
with a link-local nexthop as global nexthop instead of a IPv4-mapped
IPv6 address. If the peer interface has no IPv6 address, routes are
not installed.
Seen with bgp_nexthop_mp_ipv4_6 topotests on step2:
> root@r2:/# vtysh -c 'show bgp ipv6 fd00:100::/64 json' | jq .
> {
> "prefix": "fd00:100::/64",
> "paths": [
> {
> "nexthops": [
> {
> "ip": "fe80::449a:f8ff:fe67:1f93",
> "hostname": "r1",
> "afi": "ipv6",
> "scope": "global",
> "metric": 0,
> "accessible": true
> },
> {
> "ip": "fe80::449a:f8ff:fe67:1f93",
> "hostname": "r1",
> "afi": "ipv6",
> "scope": "link-local",
> "accessible": true,
> "used": true
> }
> ],
> }
> ]
> }
Now:
> root@r2:/# vtysh -c 'show bgp ipv6 fd00:100::/64 json' | jq .
> {
> "prefix": "fd00:100::/64",
> "paths": [
> "nexthops": [
> {
> "ip": "::ffff:172.16.0.1",
> "hostname": "r1",
> "afi": "ipv6",
> "scope": "global",
> "metric": 0,
> "accessible": true
> },
> {
> "ip": "fe80::3842:28ff:fe90:f815",
> "hostname": "r1",
> "afi": "ipv6",
> "scope": "link-local",
> "accessible": true,
> "used": true
> }
> ],
> }
> ]
> }
Note that the link-local is still preferred over the global address.
Fixes: 25995695f5 ("bgpd: set ipv4-mapped ipv6 for ipv4 with ipv6 nexthop")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
Diffstat (limited to 'lib/debug.h')
0 files changed, 0 insertions, 0 deletions
