summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
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);