summaryrefslogtreecommitdiff
path: root/bgpd/bgp_nht.c
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2024-10-28 13:28:29 +0100
committerGitHub <noreply@github.com>2024-10-28 13:28:29 +0100
commite4df48083185f959e5acf1cc7f69c6289d769c35 (patch)
tree8064b83f990568252e81466e513042bc97f57f3d /bgpd/bgp_nht.c
parentdd48a0b7917d9bd94bd3296054fbb732aa9198e4 (diff)
parent7b1c0c23fcdebda088d4dae334bbbadaf16cea55 (diff)
Merge pull request #16354 from Sokolmish/zebra-no-ra
Diffstat (limited to 'bgpd/bgp_nht.c')
-rw-r--r--bgpd/bgp_nht.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/bgpd/bgp_nht.c b/bgpd/bgp_nht.c
index 59566ee6d6..9b633b7139 100644
--- a/bgpd/bgp_nht.c
+++ b/bgpd/bgp_nht.c
@@ -652,11 +652,12 @@ static void bgp_process_nexthop_update(struct bgp_nexthop_cache *bnc,
* we receive from bgp. This is to allow us
* to work with v4 routing over v6 nexthops
*/
- if (peer && !peer->ifp
- && CHECK_FLAG(peer->flags,
- PEER_FLAG_CAPABILITY_ENHE)
- && nhr->prefix.family == AF_INET6
- && nexthop->type != NEXTHOP_TYPE_BLACKHOLE) {
+ if (peer && !peer->ifp &&
+ CHECK_FLAG(peer->flags, PEER_FLAG_CAPABILITY_ENHE) &&
+ !CHECK_FLAG(bnc->bgp->flags,
+ BGP_FLAG_IPV6_NO_AUTO_RA) &&
+ nhr->prefix.family == AF_INET6 &&
+ nexthop->type != NEXTHOP_TYPE_BLACKHOLE) {
struct interface *ifp;
ifp = if_lookup_by_index(nexthop->ifindex,
@@ -1529,6 +1530,10 @@ void bgp_nht_reg_enhe_cap_intfs(struct peer *peer)
return;
bgp = peer->bgp;
+
+ if (CHECK_FLAG(bgp->flags, BGP_FLAG_IPV6_NO_AUTO_RA))
+ return;
+
if (!sockunion2hostprefix(&peer->connection->su, &p)) {
zlog_warn("%s: Unable to convert sockunion to prefix for %s",
__func__, peer->host);