]> git.proxmox.com Git - mirror_frr.git/blobdiff - bgpd/bgpd.c
bgpd: Ensure NHT registration is not attempted for peer-group
[mirror_frr.git] / bgpd / bgpd.c
index 8cc409607658ad05026d57ec732db5e886f5a772..fe2bd19082eb0041d8589f9c41fdc332281630ff 100644 (file)
@@ -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.