diff options
author | Angelos D. Keromytis <angelos@cvs.openbsd.org> | 2001-02-24 04:42:50 +0000 |
---|---|---|
committer | Angelos D. Keromytis <angelos@cvs.openbsd.org> | 2001-02-24 04:42:50 +0000 |
commit | 90dd6a03cb164222406947bb3ddc717b060a2476 (patch) | |
tree | 0fd6644d7a7f3fd29b70fa198fb9e3c26d517cd8 /sbin/isakmpd/sa.c | |
parent | 5935d29a2f96630b8e2b1796f8392067115fd0f0 (diff) |
Make DES a feature, so isakmpd can compile on Linux (most of the fixed
by newsham@lava.net)
Diffstat (limited to 'sbin/isakmpd/sa.c')
-rw-r--r-- | sbin/isakmpd/sa.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sbin/isakmpd/sa.c b/sbin/isakmpd/sa.c index 6525721c1fa..ee0efb44c3c 100644 --- a/sbin/isakmpd/sa.c +++ b/sbin/isakmpd/sa.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sa.c,v 1.37 2001/01/27 12:03:36 niklas Exp $ */ +/* $OpenBSD: sa.c,v 1.38 2001/02/24 04:42:48 angelos Exp $ */ /* $EOM: sa.c,v 1.112 2000/12/12 00:22:52 niklas Exp $ */ /* @@ -59,6 +59,10 @@ #include "cert.h" #include "policy.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 @@ -223,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, &dstlen); sa->transport->vtbl->get_src (sa->transport, &src, &srclen); - if (memcmp (src, arg->dst, src->sa_len) && - memcmp (dst, arg->dst, dst->sa_len)) + if (memcmp (src, arg->dst, SA_LEN(src)) && + memcmp (dst, arg->dst, SA_LEN(dst))) return 0; /* match icookie+rcookie against spi */ |