diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index 0cbb341ff391..5501ec46b77c 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -16614,7 +16614,8 @@ static void bgp_config_write_peer_global(struct vty *vty, struct bgp *bgp, /* capability extended-nexthop */ if (peergroup_flag_check(peer, PEER_FLAG_CAPABILITY_ENHE)) { - if (CHECK_FLAG(peer->flags_invert, PEER_FLAG_CAPABILITY_ENHE)) + if (CHECK_FLAG(peer->flags_invert, PEER_FLAG_CAPABILITY_ENHE) && + !peer->conf_if) vty_out(vty, " no neighbor %s capability extended-nexthop\n", addr);