summaryrefslogtreecommitdiff
path: root/sys
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
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')
-rw-r--r--sys/netinet/ip_ipsp.h5
-rw-r--r--sys/netinet/ip_spd.c8
2 files changed, 7 insertions, 6 deletions
diff --git a/sys/netinet/ip_ipsp.h b/sys/netinet/ip_ipsp.h
index b4b51799f3c..5ddabac7b52 100644
--- a/sys/netinet/ip_ipsp.h
+++ b/sys/netinet/ip_ipsp.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_ipsp.h,v 1.114 2001/06/27 04:39:11 angelos Exp $ */
+/* $OpenBSD: ip_ipsp.h,v 1.115 2001/06/27 04:44:03 angelos Exp $ */
/*
* The authors of this code are John Ioannidis (ji@tla.org),
* Angelos D. Keromytis (kermit@csd.uch.gr),
@@ -604,7 +604,8 @@ extern int ipsp_acquire_sa(struct ipsec_policy *, union sockaddr_union *,
extern struct ipsec_policy *ipsec_add_policy(struct sockaddr_encap *,
struct sockaddr_encap *, union sockaddr_union *, int, int);
extern int ipsec_delete_policy(struct ipsec_policy *);
-extern struct ipsec_acquire *ipsp_pending_acquire(union sockaddr_union *);
+extern struct ipsec_acquire *ipsp_pending_acquire(struct ipsec_policy *,
+ union sockaddr_union *);
extern void ipsp_delete_acquire(void *);
extern int ipsp_is_unspecified(union sockaddr_union);
extern void ipsp_reffree(struct ipsec_ref *);
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. */