summaryrefslogtreecommitdiff
path: root/proto/static
diff options
context:
space:
mode:
authorJan Moskyto Matejka <mq@ucw.cz>2017-04-26 12:30:22 +0200
committerJan Moskyto Matejka <mq@ucw.cz>2017-04-26 12:30:22 +0200
commit69fddac0525b1b0c940d778a161ed3a0a742ed6f (patch)
tree3fd1d68a1dc84f6d14bd6705fe3505be1483d4ee /proto/static
parent93a3661c15c612e1de807524649482765b2c2702 (diff)
parentb29499996bbc1612a63a7e715bb53a8abf0940e3 (diff)
Merge branch 'int-new' of gitlab.labs.nic.cz:labs/bird into int-new
Diffstat (limited to 'proto/static')
-rw-r--r--proto/static/config.Y6
1 files changed, 5 insertions, 1 deletions
diff --git a/proto/static/config.Y b/proto/static/config.Y
index 6643ba69..66ae3c98 100644
--- a/proto/static/config.Y
+++ b/proto/static/config.Y
@@ -36,7 +36,10 @@ static_nexthop_new(void)
static void
static_route_finish(void)
-{ }
+{
+ if (net_type_match(this_srt->net, NB_DEST) == !this_srt->dest)
+ cf_error("Unexpected or missing nexthop/type");
+}
CF_DECLS
@@ -119,6 +122,7 @@ stat_route:
this_srt->via = $3;
this_srt->mls = $5;
}
+ | stat_route0 { this_srt->dest = RTD_NONE; }
| stat_route0 DROP { this_srt->dest = RTD_BLACKHOLE; }
| stat_route0 REJECT { this_srt->dest = RTD_UNREACHABLE; }
| stat_route0 BLACKHOLE { this_srt->dest = RTD_BLACKHOLE; }