summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Rak <brianrak@gameservers.com>2017-08-14 17:22:03 -0400
committerBrian Rak <brianrak@gameservers.com>2017-08-14 17:25:12 -0400
commita1e91fee4cf8a0441fcc7a433f87dd01d16f2deb (patch)
tree0c6f6d1e155d9926423b100a99f333397e0ea2bd
parent7e4f56d349f75ab07e70bf4edcd28085eb4cfcc6 (diff)
bgpd: Check for per-peer outbound configuration, in addition to the peer-group config
When displaying the config, bgpd only checked for the existance of a peer-group prefix-list before deciding to not display the outbound prefix-list. This commit updates the outbound prefix-list logic to match the inbound.
-rw-r--r--bgpd/bgpd.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c
index f9dbac2f71..d7733fbacd 100644
--- a/bgpd/bgpd.c
+++ b/bgpd/bgpd.c
@@ -6190,11 +6190,14 @@ static void bgp_config_write_filter(struct vty *vty, struct peer *peer,
addr, filter->plist[in].name);
}
- if (filter->plist[out].name && !gfilter) {
- afi_header_vty_out(vty, afi, safi, write,
- " neighbor %s prefix-list %s out\n", addr,
- filter->plist[out].name);
- }
+ if (filter->plist[out].name)
+ if (!gfilter || !gfilter->plist[out].name
+ || strcmp(filter->plist[out].name, gfilter->plist[out].name)
+ != 0) {
+ afi_header_vty_out(vty, afi, safi, write,
+ " neighbor %s prefix-list %s out\n",
+ addr, filter->plist[out].name);
+ }
/* route-map. */
if (filter->map[RMAP_IN].name)