summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2002-12-04 12:57:56 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2002-12-04 12:57:56 +0000
commitb7bba4bb3b701163eb1cdd676dc7b8030e2ab556 (patch)
tree3d570ca0a6c741cef12dda9ab5f8499ffad52b7b /sbin
parent5042c2382d849f1d16a2901682b9d8ce8a66f6d1 (diff)
in host(), apply a given netmask to all members of the node_host list
returned by ifa_lookup(). reported by Alejandro G. Belluscio ok dhartmei@
Diffstat (limited to 'sbin')
-rw-r--r--sbin/pfctl/parse.y6
1 files changed, 3 insertions, 3 deletions
diff --git a/sbin/pfctl/parse.y b/sbin/pfctl/parse.y
index 26e286161b8..ab841b2be6e 100644
--- a/sbin/pfctl/parse.y
+++ b/sbin/pfctl/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.233 2002/12/04 08:07:27 deraadt Exp $ */
+/* $OpenBSD: parse.y,v 1.234 2002/12/04 12:57:55 henning Exp $ */
/*
* Copyright (c) 2001 Markus Friedl. All rights reserved.
@@ -3665,8 +3665,8 @@ host(char *s, int mask)
if (ifa_exists(s) || !strncmp(s, "self", IFNAMSIZ)) {
/* interface with this name exists */
h = ifa_lookup(s, PFCTL_IFLOOKUP_HOST);
- if (h != NULL && mask > -1)
- set_ipmask(h, mask);
+ for (n = h; n != NULL && mask > -1; n = n->next)
+ set_ipmask(n, mask);
return (h);
}