bgpd: "no neighbor x.x.x.x send-community" not displayed correctly

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>

We would only diplay one "no neighbor 2.2.2.2 send-community XYZ" but
there might be multiple that need to be displayed.
This commit is contained in:
Daniel Walton 2017-06-12 20:09:09 +00:00
parent ad2e2470f6
commit 62d8f9a842

View File

@ -7096,26 +7096,31 @@ bgp_config_write_peer_af (struct vty *vty, struct bgp *bgp,
" no neighbor %s send-community all%s", " no neighbor %s send-community all%s",
addr, VTY_NEWLINE); addr, VTY_NEWLINE);
} }
else if (!peer_af_flag_check (peer, afi, safi, PEER_FLAG_SEND_LARGE_COMMUNITY) && else
(!g_peer || peer_af_flag_check (g_peer, afi, safi, PEER_FLAG_SEND_LARGE_COMMUNITY)))
{ {
afi_header_vty_out (vty, afi, safi, write, if (!peer_af_flag_check (peer, afi, safi, PEER_FLAG_SEND_LARGE_COMMUNITY) &&
" no neighbor %s send-community large%s", (!g_peer || peer_af_flag_check (g_peer, afi, safi, PEER_FLAG_SEND_LARGE_COMMUNITY)))
addr, VTY_NEWLINE); {
} afi_header_vty_out (vty, afi, safi, write,
else if (!peer_af_flag_check (peer, afi, safi, PEER_FLAG_SEND_EXT_COMMUNITY) && " no neighbor %s send-community large%s",
(!g_peer || peer_af_flag_check (g_peer, afi, safi, PEER_FLAG_SEND_EXT_COMMUNITY))) addr, VTY_NEWLINE);
{ }
afi_header_vty_out (vty, afi, safi, write,
" no neighbor %s send-community extended%s", if (!peer_af_flag_check (peer, afi, safi, PEER_FLAG_SEND_EXT_COMMUNITY) &&
addr, VTY_NEWLINE); (!g_peer || peer_af_flag_check (g_peer, afi, safi, PEER_FLAG_SEND_EXT_COMMUNITY)))
} {
else if (!peer_af_flag_check (peer, afi, safi, PEER_FLAG_SEND_COMMUNITY) && afi_header_vty_out (vty, afi, safi, write,
(!g_peer || peer_af_flag_check (g_peer, afi, safi, PEER_FLAG_SEND_COMMUNITY))) " no neighbor %s send-community extended%s",
{ addr, VTY_NEWLINE);
afi_header_vty_out (vty, afi, safi, write, }
" no neighbor %s send-community%s",
addr, VTY_NEWLINE); if (!peer_af_flag_check (peer, afi, safi, PEER_FLAG_SEND_COMMUNITY) &&
(!g_peer || peer_af_flag_check (g_peer, afi, safi, PEER_FLAG_SEND_COMMUNITY)))
{
afi_header_vty_out (vty, afi, safi, write,
" no neighbor %s send-community%s",
addr, VTY_NEWLINE);
}
} }
} }