summaryrefslogtreecommitdiff
path: root/sbin/isakmpd/pf_key_v2.c
diff options
context:
space:
mode:
authorHakan Olsson <ho@cvs.openbsd.org>2004-06-23 23:36:02 +0000
committerHakan Olsson <ho@cvs.openbsd.org>2004-06-23 23:36:02 +0000
commit6a943d2698c0a4eb4c2d744ec01b5d503adfacea (patch)
tree3adab23677004dbe279dc9f40efd8173a09d9da5 /sbin/isakmpd/pf_key_v2.c
parentdede330f36d279a7b8d32a180b75202c42842412 (diff)
Print corrent prefix. Found and tested by alex at vbone.net.
Diffstat (limited to 'sbin/isakmpd/pf_key_v2.c')
-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)