]> git.puffer.fish Git - matthieu/frr.git/commitdiff
bgpd: Allow 'match peer' for all route-map types
authorDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 18 Oct 2017 14:19:58 +0000 (10:19 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 25 Oct 2017 13:24:53 +0000 (09:24 -0400)
There are multiple places that we use route-maps in bgp
There is no need to limit the route-map 'match peer ...' command
to just import and export route-map types.  I see need for
using this in table-maps as well.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
bgpd/bgp_routemap.c

index 75688e55c218a871da22b08a00c0bca6a998eccc..f26498fb0322dc2a34e07b1cda1582f6ec7f199c 100644 (file)
@@ -249,10 +249,6 @@ static route_map_result_t route_match_peer(void *rule, struct prefix *prefix,
                su = &pc->su;
                peer = ((struct bgp_info *)object)->peer;
 
-               if (!CHECK_FLAG(peer->rmap_type, PEER_RMAP_TYPE_IMPORT)
-                   && !CHECK_FLAG(peer->rmap_type, PEER_RMAP_TYPE_EXPORT))
-                       return RMAP_NOMATCH;
-
                if (pc->interface) {
                        if (!peer->conf_if)
                                return RMAP_NOMATCH;