summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
authorOndrej Zajicek (work) <santiago@crfreenet.org>2016-05-12 16:04:47 +0200
committerOndrej Zajicek (work) <santiago@crfreenet.org>2016-05-12 16:04:47 +0200
commit286e2011d22ea6914d5f2db5de3f11911a1fb663 (patch)
tree7caa6725f988f51fab0c3ba09a909c66c828b378 /filter
parent0c6dfe52369a59d7f3da8ee6bc7c505e3da5c064 (diff)
Miscellaneous minor fixes
Diffstat (limited to 'filter')
-rw-r--r--filter/filter.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/filter/filter.c b/filter/filter.c
index cc1bb3dc..7b3e550f 100644
--- a/filter/filter.c
+++ b/filter/filter.c
@@ -1277,9 +1277,13 @@ interpret(struct f_inst *what)
}
struct rtable *table = ((struct f_inst_roa_check *) what)->rtc->table;
- if (!table || table->addr_type != (v1.val.net->type == NET_IP4 ? NET_ROA4 : NET_ROA6))
+ if (!table)
runtime("Missing ROA table");
+ /* Table type is either NET_ROA4 or NET_ROA6, checked in parser */
+ if (v1.val.net->type != ((table->addr_type == NET_ROA4) ? NET_IP4 : NET_IP6))
+ runtime("Incompatible net type");
+
res.type = T_ENUM_ROA;
res.val.i = net_roa_check(table, v1.val.net, as);