summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortobhe <tobhe@openbsd.org>2020-11-06 20:39:54 +0000
committertobhe <tobhe@openbsd.org>2020-11-06 20:39:54 +0000
commit8f4062e0c812b0e21429f2e5629c459dec4f02a6 (patch)
tree03ba4df624a59ceedaeb4005e1f14aa312f04710
parentmention that acme-client generates a 4096-bit or secp384r1 key if the key (diff)
downloadwireguard-openbsd-8f4062e0c812b0e21429f2e5629c459dec4f02a6.tar.xz
wireguard-openbsd-8f4062e0c812b0e21429f2e5629c459dec4f02a6.zip
Set correct netmask on patched addresses for debug printing.
-rw-r--r--sbin/iked/ikev2.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sbin/iked/ikev2.c b/sbin/iked/ikev2.c
index dd827f94ae6..38503d79872 100644
--- a/sbin/iked/ikev2.c
+++ b/sbin/iked/ikev2.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ikev2.c,v 1.275 2020/10/30 23:32:42 tobhe Exp $ */
+/* $OpenBSD: ikev2.c,v 1.276 2020/11/06 20:39:54 tobhe Exp $ */
/*
* Copyright (c) 2019 Tobias Heider <tobias.heider@stusta.de>
@@ -6759,6 +6759,8 @@ ikev2_cp_fixaddr(struct iked_sa *sa, struct iked_addr *addr,
if (in4->sin_addr.s_addr)
return (-1);
memcpy(patched, sa->sa_addrpool, sizeof(*patched));
+ patched->addr_net = 0;
+ patched->addr_mask = 32;
break;
case AF_INET6:
if (sa->sa_addrpool6 == NULL)
@@ -6767,6 +6769,8 @@ ikev2_cp_fixaddr(struct iked_sa *sa, struct iked_addr *addr,
if (!IN6_IS_ADDR_UNSPECIFIED(&in6->sin6_addr))
return (-1);
memcpy(patched, sa->sa_addrpool6, sizeof(*patched));
+ patched->addr_net = 0;
+ patched->addr_mask = 128;
break;
}
return (0);