summaryrefslogtreecommitdiff
path: root/proto/bgp/config.Y
diff options
context:
space:
mode:
authorOndrej Zajicek (work) <santiago@crfreenet.org>2019-11-10 02:06:07 +0100
committerOndrej Zajicek (work) <santiago@crfreenet.org>2019-11-10 02:06:07 +0100
commit0b228fca04c8a9a81af6a4973877ceba9aede3f0 (patch)
treeae5a7e9a1c8d4c6adc86db1d543a2befbcfa3a63 /proto/bgp/config.Y
parentbecda5638a8ff8b056ec04b5e156e86b168cb9ef (diff)
BGP: Add option to enforce first AS in AS_PATH
This is optional check described in RFC 4271. Although this can be also done by filters, it is widely implemented option in BGP implementations. Thanks to Eugene Bogomazov for the original patch.
Diffstat (limited to 'proto/bgp/config.Y')
-rw-r--r--proto/bgp/config.Y4
1 files changed, 3 insertions, 1 deletions
diff --git a/proto/bgp/config.Y b/proto/bgp/config.Y
index 090ba24e..7279560b 100644
--- a/proto/bgp/config.Y
+++ b/proto/bgp/config.Y
@@ -30,7 +30,8 @@ CF_KEYWORDS(BGP, LOCAL, NEIGHBOR, AS, HOLD, TIME, CONNECT, RETRY, KEEPALIVE,
GRACEFUL, RESTART, AWARE, CHECK, LINK, PORT, EXTENDED, MESSAGES, SETKEY,
STRICT, BIND, CONFEDERATION, MEMBER, MULTICAST, FLOW4, FLOW6, LONG,
LIVED, STALE, IMPORT, IBGP, EBGP, MANDATORY, INTERNAL, EXTERNAL, SETS,
- DYNAMIC, RANGE, NAME, DIGITS, BGP_AIGP, AIGP, ORIGINATE, COST)
+ DYNAMIC, RANGE, NAME, DIGITS, BGP_AIGP, AIGP, ORIGINATE, COST, ENFORCE,
+ FIRST)
%type <i> bgp_nh
%type <i32> bgp_afi
@@ -191,6 +192,7 @@ bgp_proto:
| bgp_proto CHECK LINK bool ';' { BGP_CFG->check_link = $4; }
| bgp_proto BFD bool ';' { BGP_CFG->bfd = $3; cf_check_bfd($3); }
| bgp_proto BFD GRACEFUL ';' { BGP_CFG->bfd = BGP_BFD_GRACEFUL; cf_check_bfd(1); }
+ | bgp_proto ENFORCE FIRST AS bool ';' { BGP_CFG->enforce_first_as = $5; }
;
bgp_afi: