diff options
author | Ondrej Zajicek <santiago@crfreenet.org> | 2012-01-08 15:28:27 +0100 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2012-01-08 15:31:34 +0100 |
commit | 53ffbff39f054e1302fb296327b9bb1b4f88226c (patch) | |
tree | 6e0f21ac671dd1cf35d7a3322a89ebb304b0c2c6 /proto/bgp/config.Y | |
parent | eb1451a3a0c45a4cc62dd0f1f3c3157ec38e2f8e (diff) |
Implements support for link-local addresses in BGP.
Thanks Matthias Schiffer for the original patch.
Diffstat (limited to 'proto/bgp/config.Y')
-rw-r--r-- | proto/bgp/config.Y | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/proto/bgp/config.Y b/proto/bgp/config.Y index 3ef9b290..5fb60940 100644 --- a/proto/bgp/config.Y +++ b/proto/bgp/config.Y @@ -57,11 +57,15 @@ bgp_proto: | bgp_proto proto_item ';' | bgp_proto LOCAL AS expr ';' { BGP_CFG->local_as = $4; } | bgp_proto LOCAL ipa AS expr ';' { BGP_CFG->source_addr = $3; BGP_CFG->local_as = $5; } - | bgp_proto NEIGHBOR ipa AS expr ';' { - if (ipa_nonzero(BGP_CFG->remote_ip)) cf_error("Only one neighbor per BGP instance is allowed"); + | bgp_proto NEIGHBOR ipa ipa_scope AS expr ';' { + if (ipa_nonzero(BGP_CFG->remote_ip)) + cf_error("Only one neighbor per BGP instance is allowed"); + if (!ipa_has_link_scope($3) != !$4) + cf_error("Link-local address and interface scope must be used together"); BGP_CFG->remote_ip = $3; - BGP_CFG->remote_as = $5; + BGP_CFG->iface = $4; + BGP_CFG->remote_as = $6; } | bgp_proto RR CLUSTER ID idval ';' { BGP_CFG->rr_cluster_id = $5; } | bgp_proto RR CLIENT ';' { BGP_CFG->rr_client = 1; } |