1
0
mirror of https://gitlab.labs.nic.cz/labs/bird.git synced 2024-05-11 16:54:54 +00:00

Miscellaneous minor fixes

This commit is contained in:
Ondrej Zajicek (work)
2016-05-12 16:04:47 +02:00
parent 0c6dfe5236
commit 286e2011d2
11 changed files with 136 additions and 113 deletions

View File

@@ -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);