summaryrefslogtreecommitdiff
path: root/sbin/isakmpd/sa.c
diff options
context:
space:
mode:
Diffstat (limited to 'sbin/isakmpd/sa.c')
-rw-r--r--sbin/isakmpd/sa.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/sbin/isakmpd/sa.c b/sbin/isakmpd/sa.c
index 66b4ed1bc02..1e834268480 100644
--- a/sbin/isakmpd/sa.c
+++ b/sbin/isakmpd/sa.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sa.c,v 1.48 2001/08/15 13:06:53 ho Exp $ */
+/* $OpenBSD: sa.c,v 1.49 2001/10/26 13:29:26 ho Exp $ */
/* $EOM: sa.c,v 1.112 2000/12/12 00:22:52 niklas Exp $ */
/*
@@ -60,10 +60,6 @@
#include "policy.h"
#include "key.h"
-#ifndef SA_LEN
-#define SA_LEN(x) (x)->sa_len
-#endif
-
/* Initial number of bits from the cookies used as hash. */
#define INITIAL_BUCKET_BITS 6
@@ -206,8 +202,8 @@ sa_check_peer (struct sa *sa, void *v_addr)
return 0;
sa->transport->vtbl->get_dst (sa->transport, &dst);
- return dst->sa_len == addr->len
- && memcmp (dst, addr->addr, dst->sa_len) == 0;
+ return sysdep_sa_len (dst) == addr->len
+ && memcmp (dst, addr->addr, sysdep_sa_len (dst)) == 0;
}
struct dst_isakmpspi_arg {
@@ -231,8 +227,8 @@ isakmp_sa_check (struct sa *sa, void *v_arg)
/* verify address is either src or dst for this sa */
sa->transport->vtbl->get_dst (sa->transport, &dst);
sa->transport->vtbl->get_src (sa->transport, &src);
- if (memcmp (src, arg->dst, SA_LEN(src)) &&
- memcmp (dst, arg->dst, SA_LEN(dst)))
+ if (memcmp (src, arg->dst, sysdep_sa_len (src)) &&
+ memcmp (dst, arg->dst, sysdep_sa_len (dst)))
return 0;
/* match icookie+rcookie against spi */