summaryrefslogtreecommitdiff
path: root/sbin/isakmpd
diff options
context:
space:
mode:
authorAngelos D. Keromytis <angelos@cvs.openbsd.org>2001-01-05 19:30:38 +0000
committerAngelos D. Keromytis <angelos@cvs.openbsd.org>2001-01-05 19:30:38 +0000
commitabc3888038bc7a7587c5055715fceb941eb96860 (patch)
tree289dd46b4154bfa5d7c8261ffbc3928b3ba9cc57 /sbin/isakmpd
parentf770dad2a8b83c39071b159c6a9b0dd0216ee986 (diff)
Set the correct direction for KAME SPD entries (problem reported and
fix tested by Tim.Ding@qobra.com)
Diffstat (limited to 'sbin/isakmpd')
-rw-r--r--sbin/isakmpd/pf_key_v2.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sbin/isakmpd/pf_key_v2.c b/sbin/isakmpd/pf_key_v2.c
index 0e4b971c5a3..12e77f656a9 100644
--- a/sbin/isakmpd/pf_key_v2.c
+++ b/sbin/isakmpd/pf_key_v2.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pf_key_v2.c,v 1.41 2000/12/15 06:34:54 provos Exp $ */
+/* $OpenBSD: pf_key_v2.c,v 1.42 2001/01/05 19:30:37 angelos Exp $ */
/* $EOM: pf_key_v2.c,v 1.79 2000/12/12 00:33:19 niklas Exp $ */
/*
@@ -1499,7 +1499,10 @@ pf_key_v2_flow (in_addr_t laddr, in_addr_t lmask, in_addr_t raddr,
policy->sadb_x_policy_exttype = SADB_X_EXT_POLICY;
policy->sadb_x_policy_len = sizeof policy_buf / PF_KEY_V2_CHUNK;
policy->sadb_x_policy_type = IPSEC_POLICY_IPSEC;
- policy->sadb_x_policy_dir = IPSEC_DIR_OUTBOUND;
+ if (ingress)
+ policy->sadb_x_policy_dir = IPSEC_DIR_INBOUND;
+ else
+ policy->sadb_x_policy_dir = IPSEC_DIR_OUTBOUND;
policy->sadb_x_policy_reserved = 0;
/* Setup the IPSECREQUEST extension part. */