summaryrefslogtreecommitdiff
path: root/sbin/ipsecctl/parse.y
diff options
context:
space:
mode:
authorMarkus Friedl <markus@cvs.openbsd.org>2007-01-04 21:31:22 +0000
committerMarkus Friedl <markus@cvs.openbsd.org>2007-01-04 21:31:22 +0000
commit9b6643396e32c30a97ef7a70fce259762fbdcbcd (patch)
treed48fcc46c48ebece29b0bac6179912f97ec355ee /sbin/ipsecctl/parse.y
parent6aa804bb01c627a822a2b31e01d161ec829448cf (diff)
don't pass -1 as a netmask; report vicviq at gmail.com
Diffstat (limited to 'sbin/ipsecctl/parse.y')
-rw-r--r--sbin/ipsecctl/parse.y7
1 files changed, 4 insertions, 3 deletions
diff --git a/sbin/ipsecctl/parse.y b/sbin/ipsecctl/parse.y
index 694aab4c077..61f3232f1e8 100644
--- a/sbin/ipsecctl/parse.y
+++ b/sbin/ipsecctl/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.115 2007/01/02 23:27:33 itojun Exp $ */
+/* $OpenBSD: parse.y,v 1.116 2007/01/04 21:31:21 markus Exp $ */
/*
* Copyright (c) 2002, 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -1461,10 +1461,11 @@ host_dns(const char *s, int mask)
* syntax.
*/
if (ipa->af == AF_INET)
- set_ipmask(ipa, mask);
+ set_ipmask(ipa, mask == -1 ? 32 : mask);
else
if (mask != -1)
- err(1, "host_dns: cannot apply netmask on non-IPv4 address");
+ err(1, "host_dns: cannot apply netmask "
+ "on non-IPv4 address");
break;
}
freeaddrinfo(res0);