From: Pascal Mathis Date: Sun, 27 May 2018 17:23:57 +0000 (+0200) Subject: bgpd: Fix group overrides for AF flags/filters X-Git-Tag: frr-5.0.1~10^2~11 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=d6efad3bf7ab41fc4f86164507e446575dcea41e;p=matthieu%2Ffrr.git bgpd: Fix group overrides for AF flags/filters The previous commit introduced very strict unit tests which check all three involved components (config input, config output, internal data structures) which revealed two more bugs in the peer-group override implementation. This commit fixes overrides for 'allowas-in ' and 'unsuppress-map', which both had a small mistake/typo causing those issues. Signed-off-by: Pascal Mathis (cherry picked from commit 246bb5f07a3c491fdf67572f05b4f8d4a43e6abf) --- diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c index 92b8c8523a..b998023e1f 100644 --- a/bgpd/bgpd.c +++ b/bgpd/bgpd.c @@ -5097,7 +5097,7 @@ int peer_allowas_in_set(struct peer *peer, afi_t afi, safi_t safi, for (ALL_LIST_ELEMENTS(peer->group->peer, node, nnode, member)) { /* Skip peers with overridden configuration. */ if (CHECK_FLAG(member->af_flags_override[afi][safi], - PEER_FLAG_ALLOWAS_IN_ORIGIN)) + PEER_FLAG_ALLOWAS_IN)) continue; /* Set flag and configuration on peer-group member. */ @@ -6103,7 +6103,7 @@ int peer_unsuppress_map_set(struct peer *peer, afi_t afi, safi_t safi, */ for (ALL_LIST_ELEMENTS(peer->group->peer, node, nnode, member)) { /* Skip peers with overridden configuration. */ - if (CHECK_FLAG(peer->filter_override[afi][safi][0], + if (CHECK_FLAG(member->filter_override[afi][safi][0], PEER_FT_UNSUPPRESS_MAP)) continue;