summaryrefslogtreecommitdiff
path: root/sbin/isakmpd
diff options
context:
space:
mode:
authorHakan Olsson <ho@cvs.openbsd.org>2001-06-29 18:12:08 +0000
committerHakan Olsson <ho@cvs.openbsd.org>2001-06-29 18:12:08 +0000
commit7fe82d8289f4aea5692bfb62d76b5081fe2a6546 (patch)
treef56f4213e12a22a6ce73d28138590834d2ea4f4d /sbin/isakmpd
parent8d4f835cc898c4594133dd4257e573d4c0b3dab8 (diff)
A few more direct sa_len usages.
Diffstat (limited to 'sbin/isakmpd')
-rw-r--r--sbin/isakmpd/cookie.c6
-rw-r--r--sbin/isakmpd/sa.c5
2 files changed, 6 insertions, 5 deletions
diff --git a/sbin/isakmpd/cookie.c b/sbin/isakmpd/cookie.c
index 0219c02d188..39e2d1b781e 100644
--- a/sbin/isakmpd/cookie.c
+++ b/sbin/isakmpd/cookie.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cookie.c,v 1.7 2001/06/25 00:00:44 ho Exp $ */
+/* $OpenBSD: cookie.c,v 1.8 2001/06/29 18:12:07 ho Exp $ */
/* $EOM: cookie.c,v 1.21 1999/08/05 15:00:04 niklas Exp $ */
/*
@@ -68,9 +68,9 @@ cookie_gen (struct transport *t, struct exchange *exchange, u_int8_t *buf,
hash->Init (hash->ctx);
(*t->vtbl->get_dst) (t, &name, &name_len);
- hash->Update (hash->ctx, (u_int8_t *)name, name_len);
+ hash->Update (hash->ctx, (u_int8_t *)name, name->sa_len);
(*t->vtbl->get_src) (t, &name, &name_len);
- hash->Update (hash->ctx, (u_int8_t *)name, name_len);
+ hash->Update (hash->ctx, (u_int8_t *)name, name->sa_len);
if (exchange->initiator == 0)
hash->Update (hash->ctx, exchange->cookies + ISAKMP_HDR_ICOOKIE_OFF,
ISAKMP_HDR_ICOOKIE_LEN);
diff --git a/sbin/isakmpd/sa.c b/sbin/isakmpd/sa.c
index eff8ddaa113..5ca81f05815 100644
--- a/sbin/isakmpd/sa.c
+++ b/sbin/isakmpd/sa.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sa.c,v 1.43 2001/06/07 03:20:21 angelos Exp $ */
+/* $OpenBSD: sa.c,v 1.44 2001/06/29 18:12:07 ho Exp $ */
/* $EOM: sa.c,v 1.112 2000/12/12 00:22:52 niklas Exp $ */
/*
@@ -203,7 +203,8 @@ sa_check_peer (struct sa *sa, void *v_addr)
return 0;
sa->transport->vtbl->get_dst (sa->transport, &dst, &dstlen);
- return dstlen == addr->len && memcmp (dst, addr->addr, dstlen) == 0;
+ return dst->sa_len == addr->len
+ && memcmp (dst, addr->addr, dst->sa_len) == 0;
}
struct dst_isakmpspi_arg {