mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-07-25 22:30:52 +00:00
bgpd, tests: don't send local nexthop from rr client
AS 65000 | AS 65001 | RR | | | R1 --- | --- R2 | When r1 peer is an iBGP route reflector client of rr and r2 peer is a eBGP neighbor of rr, and all three routers shares the same network, r2 receives announcements coming from r1 with a IPv6 link-local nexthop from rr. This is incorrect as r2 should send traffic to r1 without involving rr. Do not send an IPv6 link-local nexthop if the originating peer is a route-reflector client. Link: https://github.com/FRRouting/frr/pull/16219#issuecomment-2397425505 Link: https://github.com/FRRouting/frr/pull/17037#discussion_r1792529683 Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
This commit is contained in:
parent
4ae65cc21e
commit
c4a8263628
@ -2472,6 +2472,7 @@ bool subgroup_announce_check(struct bgp_dest *dest, struct bgp_path_info *pi,
|
|||||||
if (IN6_IS_ADDR_LINKLOCAL(&attr->mp_nexthop_local))
|
if (IN6_IS_ADDR_LINKLOCAL(&attr->mp_nexthop_local))
|
||||||
global_and_ll = true;
|
global_and_ll = true;
|
||||||
} else if (!ibgp_to_ibgp && !transparent &&
|
} else if (!ibgp_to_ibgp && !transparent &&
|
||||||
|
!CHECK_FLAG(from->af_flags[afi][safi], PEER_FLAG_REFLECTOR_CLIENT) &&
|
||||||
IN6_IS_ADDR_LINKLOCAL(&peer->nexthop.v6_local) && peer->shared_network &&
|
IN6_IS_ADDR_LINKLOCAL(&peer->nexthop.v6_local) && peer->shared_network &&
|
||||||
(from == bgp->peer_self || peer->sort == BGP_PEER_EBGP))
|
(from == bgp->peer_self || peer->sort == BGP_PEER_EBGP))
|
||||||
global_and_ll = true;
|
global_and_ll = true;
|
||||||
|
@ -9,13 +9,7 @@
|
|||||||
"ip": "fd00:0:2::1",
|
"ip": "fd00:0:2::1",
|
||||||
"hostname": "rr",
|
"hostname": "rr",
|
||||||
"afi": "ipv6",
|
"afi": "ipv6",
|
||||||
"scope": "global"
|
"scope": "global",
|
||||||
},
|
|
||||||
{
|
|
||||||
"ip": "link-local:rr:eth-sw",
|
|
||||||
"hostname": "rr",
|
|
||||||
"afi": "ipv6",
|
|
||||||
"scope": "link-local",
|
|
||||||
"used": true
|
"used": true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -28,13 +22,7 @@
|
|||||||
"ip": "fd00:0:2::2",
|
"ip": "fd00:0:2::2",
|
||||||
"hostname": "rr",
|
"hostname": "rr",
|
||||||
"afi": "ipv6",
|
"afi": "ipv6",
|
||||||
"scope": "global"
|
"scope": "global",
|
||||||
},
|
|
||||||
{
|
|
||||||
"ip": "link-local:rr:eth-sw",
|
|
||||||
"hostname": "rr",
|
|
||||||
"afi": "ipv6",
|
|
||||||
"scope": "link-local",
|
|
||||||
"used": true
|
"used": true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -47,13 +35,7 @@
|
|||||||
"ip": "fd00:0:2::3",
|
"ip": "fd00:0:2::3",
|
||||||
"hostname": "rr",
|
"hostname": "rr",
|
||||||
"afi": "ipv6",
|
"afi": "ipv6",
|
||||||
"scope": "global"
|
"scope": "global",
|
||||||
},
|
|
||||||
{
|
|
||||||
"ip": "link-local:rr:eth-sw",
|
|
||||||
"hostname": "rr",
|
|
||||||
"afi": "ipv6",
|
|
||||||
"scope": "link-local",
|
|
||||||
"used": true
|
"used": true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -117,13 +99,7 @@
|
|||||||
"ip": "fd00:0:2::1",
|
"ip": "fd00:0:2::1",
|
||||||
"hostname": "rr",
|
"hostname": "rr",
|
||||||
"afi": "ipv6",
|
"afi": "ipv6",
|
||||||
"scope": "global"
|
"scope": "global",
|
||||||
},
|
|
||||||
{
|
|
||||||
"ip": "link-local:rr:eth-sw",
|
|
||||||
"hostname": "rr",
|
|
||||||
"afi": "ipv6",
|
|
||||||
"scope": "link-local",
|
|
||||||
"used": true
|
"used": true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -136,13 +112,7 @@
|
|||||||
"ip": "fd00:0:2::2",
|
"ip": "fd00:0:2::2",
|
||||||
"hostname": "rr",
|
"hostname": "rr",
|
||||||
"afi": "ipv6",
|
"afi": "ipv6",
|
||||||
"scope": "global"
|
"scope": "global",
|
||||||
},
|
|
||||||
{
|
|
||||||
"ip": "link-local:rr:eth-sw",
|
|
||||||
"hostname": "rr",
|
|
||||||
"afi": "ipv6",
|
|
||||||
"scope": "link-local",
|
|
||||||
"used": true
|
"used": true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -155,13 +125,7 @@
|
|||||||
"ip": "fd00:0:2::3",
|
"ip": "fd00:0:2::3",
|
||||||
"hostname": "rr",
|
"hostname": "rr",
|
||||||
"afi": "ipv6",
|
"afi": "ipv6",
|
||||||
"scope": "global"
|
"scope": "global",
|
||||||
},
|
|
||||||
{
|
|
||||||
"ip": "link-local:rr:eth-sw",
|
|
||||||
"hostname": "rr",
|
|
||||||
"afi": "ipv6",
|
|
||||||
"scope": "link-local",
|
|
||||||
"used": true
|
"used": true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -9,13 +9,7 @@
|
|||||||
"ip": "fd00:0:3::9",
|
"ip": "fd00:0:3::9",
|
||||||
"hostname": "rr",
|
"hostname": "rr",
|
||||||
"afi": "ipv6",
|
"afi": "ipv6",
|
||||||
"scope": "global"
|
"scope": "global",
|
||||||
},
|
|
||||||
{
|
|
||||||
"ip": "link-local:rr:eth-r5",
|
|
||||||
"hostname": "rr",
|
|
||||||
"afi": "ipv6",
|
|
||||||
"scope": "link-local",
|
|
||||||
"used": true
|
"used": true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -28,13 +22,7 @@
|
|||||||
"ip": "fd00:0:3::9",
|
"ip": "fd00:0:3::9",
|
||||||
"hostname": "rr",
|
"hostname": "rr",
|
||||||
"afi": "ipv6",
|
"afi": "ipv6",
|
||||||
"scope": "global"
|
"scope": "global",
|
||||||
},
|
|
||||||
{
|
|
||||||
"ip": "link-local:rr:eth-r5",
|
|
||||||
"hostname": "rr",
|
|
||||||
"afi": "ipv6",
|
|
||||||
"scope": "link-local",
|
|
||||||
"used": true
|
"used": true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -47,13 +35,7 @@
|
|||||||
"ip": "fd00:0:3::9",
|
"ip": "fd00:0:3::9",
|
||||||
"hostname": "rr",
|
"hostname": "rr",
|
||||||
"afi": "ipv6",
|
"afi": "ipv6",
|
||||||
"scope": "global"
|
"scope": "global",
|
||||||
},
|
|
||||||
{
|
|
||||||
"ip": "link-local:rr:eth-r5",
|
|
||||||
"hostname": "rr",
|
|
||||||
"afi": "ipv6",
|
|
||||||
"scope": "link-local",
|
|
||||||
"used": true
|
"used": true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -117,13 +99,7 @@
|
|||||||
"ip": "fd00:0:3::9",
|
"ip": "fd00:0:3::9",
|
||||||
"hostname": "rr",
|
"hostname": "rr",
|
||||||
"afi": "ipv6",
|
"afi": "ipv6",
|
||||||
"scope": "global"
|
"scope": "global",
|
||||||
},
|
|
||||||
{
|
|
||||||
"ip": "link-local:rr:eth-r5",
|
|
||||||
"hostname": "rr",
|
|
||||||
"afi": "ipv6",
|
|
||||||
"scope": "link-local",
|
|
||||||
"used": true
|
"used": true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -136,13 +112,7 @@
|
|||||||
"ip": "fd00:0:3::9",
|
"ip": "fd00:0:3::9",
|
||||||
"hostname": "rr",
|
"hostname": "rr",
|
||||||
"afi": "ipv6",
|
"afi": "ipv6",
|
||||||
"scope": "global"
|
"scope": "global",
|
||||||
},
|
|
||||||
{
|
|
||||||
"ip": "link-local:rr:eth-r5",
|
|
||||||
"hostname": "rr",
|
|
||||||
"afi": "ipv6",
|
|
||||||
"scope": "link-local",
|
|
||||||
"used": true
|
"used": true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -155,13 +125,7 @@
|
|||||||
"ip": "fd00:0:3::9",
|
"ip": "fd00:0:3::9",
|
||||||
"hostname": "rr",
|
"hostname": "rr",
|
||||||
"afi": "ipv6",
|
"afi": "ipv6",
|
||||||
"scope": "global"
|
"scope": "global",
|
||||||
},
|
|
||||||
{
|
|
||||||
"ip": "link-local:rr:eth-r5",
|
|
||||||
"hostname": "rr",
|
|
||||||
"afi": "ipv6",
|
|
||||||
"scope": "link-local",
|
|
||||||
"used": true
|
"used": true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
Loading…
Reference in New Issue
Block a user