From 087a1c6ce097be9346ff4e8cbc0c9294f38b045b Mon Sep 17 00:00:00 2001 From: vivek Date: Thu, 5 Sep 2019 21:13:59 -0700 Subject: [PATCH] bgpd: Ensure NHT registration is not attempted for peer-group Ensure that the late registration for NHT done for IPv4 route exchange over IPv6 GUA peering is not attempted for peer-groups, only for peers. Fixes: "bgpd: Late registration of Extended Nexthop" Signed-off-by: Vivek Venkatraman Reviewed-by: Donald Sharp --- bgpd/bgpd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c index 8cc4096076..fe2bd19082 100644 --- a/bgpd/bgpd.c +++ b/bgpd/bgpd.c @@ -4070,6 +4070,9 @@ static int peer_flag_modify(struct peer *peer, uint32_t flag, int set) /* Update flag override state accordingly. */ COND_FLAG(peer->flags_override, flag, set != invert); + if (set && flag == PEER_FLAG_CAPABILITY_ENHE) + bgp_nht_register_enhe_capability_interfaces(peer); + /* Execute flag action on peer. */ if (action.type == peer_change_reset) peer_flag_modify_action(peer, flag); @@ -4078,9 +4081,6 @@ static int peer_flag_modify(struct peer *peer, uint32_t flag, int set) return 0; } - if (set && flag == PEER_FLAG_CAPABILITY_ENHE) - bgp_nht_register_enhe_capability_interfaces(peer); - /* * Update peer-group members, unless they are explicitely overriding * peer-group configuration. -- 2.39.5