summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
authorOndrej Zajicek (work) <santiago@crfreenet.org>2017-03-14 17:18:50 +0100
committerOndrej Zajicek (work) <santiago@crfreenet.org>2017-03-14 17:25:42 +0100
commita5d2a34497853a02692a0b8ea812f44d6820a399 (patch)
treec4aa68637722e863c7cd13fa26228fdf98f8cdc3 /filter
parent8c9986d310c58b26c000375be00be0deb9c2e360 (diff)
Minor cleanups
BTW, 'prefices' is hypercorrection, as 'prefix' is from 'praefixum' with plural 'praefixa'.
Diffstat (limited to 'filter')
-rw-r--r--filter/filter.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/filter/filter.c b/filter/filter.c
index a3caaf96..616f9e2a 100644
--- a/filter/filter.c
+++ b/filter/filter.c
@@ -1227,11 +1227,10 @@ interpret(struct f_inst *what)
ONEARG;
if (v1.type != T_NET)
runtime( "Prefix expected" );
- res.type = T_RD;
- if ((1 << v1.val.net->type) & (NB_VPN4 | NB_VPN6))
- res.val.ec = net_rd(v1.val.net);
- else
+ if (!net_is_vpn(v1.val.net))
runtime( "VPN address expected" );
+ res.type = T_RD;
+ res.val.ec = net_rd(v1.val.net);
break;
case P('a','f'): /* Get first ASN from AS PATH */
ONEARG;