From: Christian Franke Date: Mon, 19 Nov 2012 11:17:31 +0000 (+0000) Subject: bgpd: store "no neighbor activate" for IPv4 unicast X-Git-Tag: frr-2.0-rc1~1716 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=15c713485699fd22dfa5b7ce3ca7c6be049f1033;p=mirror%2Ffrr.git bgpd: store "no neighbor activate" for IPv4 unicast If a neighbor was in a peer group for any AFI/SAFI, bgpd would never write a "no neighbor activate" line for IPv4 unicast, so a valid setup like following could be configured, but not saved: router bgp 64600 bgp router-id 198.51.100.1 network 198.51.100.0/24 neighbor peers peer-group neighbor 2001:db8::2 remote-as 64601 no neighbor 2001:db8::2 activate ! address-family ipv6 network 2001:db8:1::/48 neighbor peers activate neighbor peers soft-reconfiguration inbound neighbor 2001:db8::2 peer-group peers exit-address-family ! Signed-off-by: Christian Franke Signed-off-by: David Lamparter --- diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c index 908bdd94f8..0b3f0a8e93 100644 --- a/bgpd/bgpd.c +++ b/bgpd/bgpd.c @@ -4915,7 +4915,7 @@ bgp_config_write_peer (struct vty *vty, struct bgp *bgp, vty_out (vty, " neighbor %s strict-capability-match%s", addr, VTY_NEWLINE); - if (! peer_group_active (peer)) + if (! peer->af_group[AFI_IP][SAFI_UNICAST]) { if (bgp_flag_check (bgp, BGP_FLAG_NO_DEFAULT_IPV4)) {