]> git.proxmox.com Git - mirror_frr.git/commitdiff
BGP "allowas-in" should accept AS paths with "local-as"
authorDaniel Walton <dwalton@cumulusnetworks.com>
Fri, 12 Jan 2018 15:31:16 +0000 (15:31 +0000)
committerDaniel Walton <dwalton@cumulusnetworks.com>
Fri, 12 Jan 2018 15:31:16 +0000 (15:31 +0000)
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
For issue #1548

bgpd/bgp_route.c

index 81b605ad79f38addf7caa9ab5863afee0675cb48..d45f780f1b4711f128b0afd71511c6c36ae9cadb 100644 (file)
@@ -2711,7 +2711,9 @@ int bgp_update(struct peer *peer, struct prefix *p, u_int32_t addpath_id,
 
        /* AS path local-as loop check. */
        if (peer->change_local_as) {
-               if (!CHECK_FLAG(peer->flags, PEER_FLAG_LOCAL_AS_NO_PREPEND))
+               if (peer->allowas_in[afi][safi])
+                       aspath_loop_count = peer->allowas_in[afi][safi];
+               else if (!CHECK_FLAG(peer->flags, PEER_FLAG_LOCAL_AS_NO_PREPEND))
                        aspath_loop_count = 1;
 
                if (aspath_loop_check(attr->aspath, peer->change_local_as)