summaryrefslogtreecommitdiff
path: root/proto/static/config.Y
diff options
context:
space:
mode:
authorOndrej Zajicek (work) <santiago@crfreenet.org>2017-03-30 13:29:34 +0200
committerJan Moskyto Matejka <mq@ucw.cz>2017-04-12 16:04:22 +0200
commitffb38dfb8b454dc23cd08836d7236a5a9c9f80c1 (patch)
tree320b828347d5aee9fc36227ca2e456494d74cac3 /proto/static/config.Y
parent2faf519cf9d34f90d59081ee5f8d6976c62f4f6e (diff)
Static: Support for dual-AF IGP tables
When recursive routes with hybrid next hops (e.g. IPv6 route with IPv4 next hop) are allowed, we need both IPv4 and IPv6 IGP tables.
Diffstat (limited to 'proto/static/config.Y')
-rw-r--r--proto/static/config.Y9
1 files changed, 8 insertions, 1 deletions
diff --git a/proto/static/config.Y b/proto/static/config.Y
index cd8bfcec..6643ba69 100644
--- a/proto/static/config.Y
+++ b/proto/static/config.Y
@@ -59,7 +59,14 @@ static_proto:
| static_proto proto_item ';'
| static_proto proto_channel ';' { this_proto->net_type = $2->net_type; }
| static_proto CHECK LINK bool ';' { STATIC_CFG->check_link = $4; }
- | static_proto IGP TABLE rtable ';' { STATIC_CFG->igp_table = $4; }
+ | static_proto IGP TABLE rtable ';' {
+ if ($4->addr_type == NET_IP4)
+ STATIC_CFG->igp_table_ip4 = $4;
+ else if ($4->addr_type == NET_IP6)
+ STATIC_CFG->igp_table_ip6 = $4;
+ else
+ cf_error("Incompatible IGP table type");
+ }
| static_proto stat_route stat_route_opt_list ';' { static_route_finish(); }
;