summaryrefslogtreecommitdiff
path: root/filter/filter.c
diff options
context:
space:
mode:
Diffstat (limited to 'filter/filter.c')
-rw-r--r--filter/filter.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/filter/filter.c b/filter/filter.c
index 616f9e2a..9f6c2cdd 100644
--- a/filter/filter.c
+++ b/filter/filter.c
@@ -829,6 +829,13 @@ interpret(struct f_inst *what)
runtime( "Can't determine type of this item" );
}
break;
+ case P('I','i'):
+ ONEARG;
+ if (v1.type != T_IP)
+ runtime( "IP version check needs an IP address" );
+ res.type = T_BOOL;
+ res.val.i = ipa_is_ip4(v1.val.ip);
+ break;
/* Set to indirect value, a1 = variable, a2 = value */
case 's':