summaryrefslogtreecommitdiff
path: root/sys/netinet/ip_spd.c
diff options
context:
space:
mode:
authorAngelos D. Keromytis <angelos@cvs.openbsd.org>2001-06-27 04:44:04 +0000
committerAngelos D. Keromytis <angelos@cvs.openbsd.org>2001-06-27 04:44:04 +0000
commita8bf55f0d5bd47f9d9603b854cca69f834ea95c3 (patch)
treefae478cd88578ef0941040a00b4f2a91882cecc3 /sys/netinet/ip_spd.c
parent68d49b6c398f245289e8d8c6a75815b161d50403 (diff)
When determining whether there's a pending acquire wrt a policy, look
at the acquires associated with the policy only.
Diffstat (limited to 'sys/netinet/ip_spd.c')
-rw-r--r--sys/netinet/ip_spd.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/netinet/ip_spd.c b/sys/netinet/ip_spd.c
index 3238748e296..18bceb4aba0 100644
--- a/sys/netinet/ip_spd.c
+++ b/sys/netinet/ip_spd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_spd.c,v 1.34 2001/06/27 04:41:32 angelos Exp $ */
+/* $OpenBSD: ip_spd.c,v 1.35 2001/06/27 04:44:03 angelos Exp $ */
/*
* The author of this code is Angelos D. Keromytis (angelos@cis.upenn.edu)
*
@@ -677,11 +677,11 @@ ipsp_delete_acquire(void *v)
* XXX Need a better structure.
*/
struct ipsec_acquire *
-ipsp_pending_acquire(union sockaddr_union *gw)
+ipsp_pending_acquire(struct ipsec_policy *ipo, union sockaddr_union *gw)
{
struct ipsec_acquire *ipa;
- for (ipa = TAILQ_FIRST(&ipsec_acquire_head); ipa;
+ for (ipa = TAILQ_FIRST(&ipo->ipo_acquires); ipa;
ipa = TAILQ_NEXT(ipa, ipa_next)) {
if (!bcmp(gw, &ipa->ipa_addr, gw->sa.sa_len))
return ipa;
@@ -704,7 +704,7 @@ ipsp_acquire_sa(struct ipsec_policy *ipo, union sockaddr_union *gw,
#endif
/* Check whether request has been made already. */
- if ((ipa = ipsp_pending_acquire(gw)) != NULL)
+ if ((ipa = ipsp_pending_acquire(ipo, gw)) != NULL)
return 0;
/* Add request in cache and proceed. */