summaryrefslogtreecommitdiff
path: root/sbin/isakmpd/policy.c
diff options
context:
space:
mode:
authorNiklas Hallqvist <niklas@cvs.openbsd.org>2000-01-27 18:07:29 +0000
committerNiklas Hallqvist <niklas@cvs.openbsd.org>2000-01-27 18:07:29 +0000
commit5d07d197ce6e858e30f1162c2271334f44c50121 (patch)
treef9eecc50b49502ef72724f3c0f7222986fe4058d /sbin/isakmpd/policy.c
parent1c26cc7fecc4c5fe939be16a341da314c7056e19 (diff)
Merge with EOM 1.13
author: ho Bugfix for IPSEC_ID_USER_FQDN from <<Jorgen.Granstam@abc.se>. Apply similar to the IPSEC_ID_FQDN case plus fix the log messages.
Diffstat (limited to 'sbin/isakmpd/policy.c')
-rw-r--r--sbin/isakmpd/policy.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/sbin/isakmpd/policy.c b/sbin/isakmpd/policy.c
index e9bbe1fe06c..62c50c5f423 100644
--- a/sbin/isakmpd/policy.c
+++ b/sbin/isakmpd/policy.c
@@ -1,5 +1,5 @@
-/* $OpenBSD: policy.c,v 1.4 2000/01/26 15:24:03 niklas Exp $ */
-/* $EOM: policy.c,v 1.12 2000/01/25 02:21:10 angelos Exp $ */
+/* $OpenBSD: policy.c,v 1.5 2000/01/27 18:07:28 niklas Exp $ */
+/* $EOM: policy.c,v 1.13 2000/01/27 17:38:43 ho Exp $ */
/*
* Copyright (c) 1999 Angelos D. Keromytis. All rights reserved.
@@ -696,24 +696,26 @@ policy_callback (char *name)
case IPSEC_ID_FQDN:
remote_id_type = "FQDN";
- remote_id = calloc (id_sz - ISAKMP_ID_DATA_OFF - ISAKMP_GEN_SZ + 1,
+ remote_id = calloc (id_sz - ISAKMP_ID_DATA_OFF + ISAKMP_GEN_SZ + 1,
sizeof (char));
if (!remote_id)
log_fatal ("policy_callback: calloc (%d, %d) failed",
- id_sz - ISAKMP_ID_DATA_OFF - ISAKMP_GEN_SZ + 1,
+ id_sz - ISAKMP_ID_DATA_OFF + ISAKMP_GEN_SZ + 1,
sizeof (char));
- memcpy (remote_id, id + ISAKMP_ID_DATA_OFF - ISAKMP_GEN_SZ, id_sz);
+ memcpy (remote_id, id + ISAKMP_ID_DATA_OFF - ISAKMP_GEN_SZ,
+ id_sz - ISAKMP_ID_DATA_OFF + ISAKMP_GEN_SZ);
break;
case IPSEC_ID_USER_FQDN:
remote_id_type = "User FQDN";
- remote_id = calloc (id_sz - ISAKMP_ID_DATA_OFF - ISAKMP_GEN_SZ + 1,
+ remote_id = calloc (id_sz - ISAKMP_ID_DATA_OFF + ISAKMP_GEN_SZ + 1,
sizeof (char));
if (!remote_id)
log_fatal ("policy_callback: calloc (%d, %d) failed",
- id_sz - ISAKMP_ID_DATA_OFF - ISAKMP_GEN_SZ + 1,
+ id_sz - ISAKMP_ID_DATA_OFF + ISAKMP_GEN_SZ + 1,
sizeof (char));
- memcpy (remote_id, id + ISAKMP_ID_DATA_OFF - ISAKMP_GEN_SZ, id_sz);
+ memcpy (remote_id, id + ISAKMP_ID_DATA_OFF - ISAKMP_GEN_SZ,
+ id_sz - ISAKMP_ID_DATA_OFF + ISAKMP_GEN_SZ);
break;
case IPSEC_ID_DER_ASN1_DN: /* XXX -- not sure what's in this. */