From 9b6643396e32c30a97ef7a70fce259762fbdcbcd Mon Sep 17 00:00:00 2001 From: Markus Friedl Date: Thu, 4 Jan 2007 21:31:22 +0000 Subject: don't pass -1 as a netmask; report vicviq at gmail.com --- sbin/ipsecctl/parse.y | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'sbin/ipsecctl') 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 @@ -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); -- cgit v1.2.3