Merge pull request #705 from dwalton76/bgpd-show-neighbor-community

bgpd: "no neighbor x.x.x.x send-community" not displayed correctly
This commit is contained in:
Lou Berger 2017-06-15 09:21:44 -04:00 committed by GitHub
commit ffef22509f

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);
}
} }
} }