summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorMike Belopuhov <mikeb@cvs.openbsd.org>2010-12-23 16:39:39 +0000
committerMike Belopuhov <mikeb@cvs.openbsd.org>2010-12-23 16:39:39 +0000
commitbd252d6fc755b93fbfd22626da22f684f260d477 (patch)
tree16919f0ee35ebc3bd4a324a39fbf116a536b1846 /sbin
parentd294f8fdd29f9f6e89e54c3c05f33e7679c42b6e (diff)
pick netmask instead of address when we mean it; found by dhill, ok reyk
Diffstat (limited to 'sbin')
-rw-r--r--sbin/iked/parse.y4
1 files changed, 3 insertions, 1 deletions
diff --git a/sbin/iked/parse.y b/sbin/iked/parse.y
index 0ce8dcf0f9d..1efb79feb74 100644
--- a/sbin/iked/parse.y
+++ b/sbin/iked/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.17 2010/12/22 16:40:06 reyk Exp $ */
+/* $OpenBSD: parse.y,v 1.18 2010/12/23 16:39:38 mikeb Exp $ */
/* $vantronix: parse.y,v 1.22 2010/06/03 11:08:34 reyk Exp $ */
/*
@@ -1881,10 +1881,12 @@ ifa_load(void)
if (n->af == AF_INET) {
sa_in = (struct sockaddr_in *)ifa->ifa_addr;
memcpy(&n->address, sa_in, sizeof(*sa_in));
+ sa_in = (struct sockaddr_in *)ifa->ifa_netmask;
n->mask = mask2prefixlen(sa_in);
} else if (n->af == AF_INET6) {
sa_in6 = (struct sockaddr_in6 *)ifa->ifa_addr;
memcpy(&n->address, sa_in6, sizeof(*sa_in6));
+ sa_in6 = (struct sockaddr_in6 *)ifa->ifa_netmask;
n->mask = mask2prefixlen6(sa_in6);
}
n->next = NULL;