summaryrefslogtreecommitdiff
path: root/nest/config.Y
diff options
context:
space:
mode:
authorJan Moskyto Matejka <mq@ucw.cz>2015-12-16 10:25:12 +0100
committerOndrej Zajicek (work) <santiago@crfreenet.org>2015-12-19 23:49:47 +0100
commit5e173e9f631913f68cf38d57a69c3ce6faf60d1e (patch)
treeaa873aa790686a108cab830c63cae1f946f61e96 /nest/config.Y
parentd7661fbe9dea980c61daa01a11a9aa59fa7be426 (diff)
Stop perusing f_prefix for non-prefix-set uses
Multiple changes by Ondrej Santiago Zajicek
Diffstat (limited to 'nest/config.Y')
-rw-r--r--nest/config.Y6
1 files changed, 2 insertions, 4 deletions
diff --git a/nest/config.Y b/nest/config.Y
index e5a6e0bb..612e4d40 100644
--- a/nest/config.Y
+++ b/nest/config.Y
@@ -98,10 +98,8 @@ idval:
| SYM {
if ($1->class == (SYM_CONSTANT | T_INT) || $1->class == (SYM_CONSTANT | T_QUAD))
$$ = SYM_VAL($1).i;
-#ifndef IPV6
- else if ($1->class == (SYM_CONSTANT | T_IP))
- $$ = ipa_to_u32(SYM_VAL($1).px.ip);
-#endif
+ else if (($1->class == (SYM_CONSTANT | T_IP)) && ipa_is_ip4(SYM_VAL($1).ip))
+ $$ = ipa_to_u32(SYM_VAL($1).ip);
else
cf_error("Number of IPv4 address constant expected");
}