summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorho <ho@openbsd.org>2004-06-23 23:36:01 +0000
committerho <ho@openbsd.org>2004-06-23 23:36:01 +0000
commitb8e06b856e5f487e2fcf0f192fe5763e820abc0d (patch)
tree09ca812c08fc293ac637d4a7be03f44b3ee8abc4
parentDo not send IPIs while cold. Should probably fix the pmap_kremove panics some have seen. (diff)
downloadwireguard-openbsd-b8e06b856e5f487e2fcf0f192fe5763e820abc0d.tar.xz
wireguard-openbsd-b8e06b856e5f487e2fcf0f192fe5763e820abc0d.zip
Print corrent prefix. Found and tested by alex at vbone.net.
-rw-r--r--sbin/isakmpd/pf_key_v2.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sbin/isakmpd/pf_key_v2.c b/sbin/isakmpd/pf_key_v2.c
index 2eac89a2d2e..4afc3eda669 100644
--- a/sbin/isakmpd/pf_key_v2.c
+++ b/sbin/isakmpd/pf_key_v2.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pf_key_v2.c,v 1.144 2004/06/21 18:41:06 ho Exp $ */
+/* $OpenBSD: pf_key_v2.c,v 1.145 2004/06/23 23:36:01 ho Exp $ */
/* $EOM: pf_key_v2.c,v 1.79 2000/12/12 00:33:19 niklas Exp $ */
/*
@@ -2263,9 +2263,9 @@ pf_key_v2_convert_id(u_int8_t * id, int idlen, size_t * reslen, int *idtype)
if (inet_ntop(AF_INET, addr, addrbuf, ADDRESS_MAX) == NULL)
return 0;
snprintf(addrbuf + strlen(addrbuf),
- ADDRESS_MAX - strlen(addrbuf),
- "/%d", pf_key_v2_mask_to_bits((u_int32_t)
- * (addr + sizeof(struct in_addr))));
+ ADDRESS_MAX - strlen(addrbuf), "/%d",
+ pf_key_v2_mask_to_bits(*(u_int32_t *)(addr +
+ sizeof(struct in_addr))));
*reslen = strlen(addrbuf);
res = (u_int8_t *) strdup(addrbuf);
if (!res)