summaryrefslogtreecommitdiff
path: root/proto/bgp/config.Y
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2013-10-21 14:58:32 +0200
committerOndrej Zajicek <santiago@crfreenet.org>2013-10-21 14:59:35 +0200
commita15dab76f93337b07b4b03a64ac3bac26285dfd9 (patch)
treeef2593148938733814a8b4b1a6fceb60e5c30886 /proto/bgp/config.Y
parentf8cc7396cf25328b002394bbd7af679188b03370 (diff)
Implements 'allow local as' option.
Similar to allowas-in option on other routers.
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 d5e5aaca..f4b2c5fe 100644
--- a/proto/bgp/config.Y
+++ b/proto/bgp/config.Y
@@ -26,7 +26,7 @@ CF_KEYWORDS(BGP, LOCAL, NEIGHBOR, AS, HOLD, TIME, CONNECT, RETRY,
PREFER, OLDER, MISSING, LLADDR, DROP, IGNORE, ROUTE, REFRESH,
INTERPRET, COMMUNITIES, BGP_ORIGINATOR_ID, BGP_CLUSTER_LIST, IGP,
TABLE, GATEWAY, DIRECT, RECURSIVE, MED, TTL, SECURITY, DETERMINISTIC,
- SECONDARY)
+ SECONDARY, ALLOW)
CF_GRAMMAR
@@ -108,6 +108,8 @@ bgp_proto:
| bgp_proto PASSIVE bool ';' { BGP_CFG->passive = $3; }
| bgp_proto INTERPRET COMMUNITIES bool ';' { BGP_CFG->interpret_communities = $4; }
| bgp_proto SECONDARY bool ';' { BGP_CFG->secondary = $3; }
+ | bgp_proto ALLOW LOCAL AS ';' { BGP_CFG->allow_local_as = -1; }
+ | bgp_proto ALLOW LOCAL AS expr ';' { BGP_CFG->allow_local_as = $5; }
| bgp_proto IGP TABLE rtable ';' { BGP_CFG->igp_table = $4; }
| bgp_proto TTL SECURITY bool ';' { BGP_CFG->ttl_security = $4; }
;