summaryrefslogtreecommitdiff
path: root/sbin/isakmpd
diff options
context:
space:
mode:
authorAngelos D. Keromytis <angelos@cvs.openbsd.org>2000-11-27 01:41:05 +0000
committerAngelos D. Keromytis <angelos@cvs.openbsd.org>2000-11-27 01:41:05 +0000
commitf92852d60415738fe874a538a06dc635e823aefa (patch)
treefcfc847303a19b98d5f67443a04a86d6bd42d2c9 /sbin/isakmpd
parent98a755df2dc775a1657cf6b664c78cb510db4deb (diff)
Fix deletion of flows.
Diffstat (limited to 'sbin/isakmpd')
-rw-r--r--sbin/isakmpd/pf_key_v2.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sbin/isakmpd/pf_key_v2.c b/sbin/isakmpd/pf_key_v2.c
index 13acfa31841..43011ff5dcc 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.36 2000/11/17 05:16:36 angelos Exp $ */
+/* $OpenBSD: pf_key_v2.c,v 1.37 2000/11/27 01:41:04 angelos Exp $ */
/* $EOM: pf_key_v2.c,v 1.67 2000/11/17 05:10:14 angelos Exp $ */
/*
@@ -1193,6 +1193,7 @@ pf_key_v2_flow (in_addr_t laddr, in_addr_t lmask, in_addr_t raddr,
#ifdef SADB_X_EXT_FLOW_TYPE
/* Setup the flow type extension. */
+ bzero (&flowtype, sizeof flowtype);
flowtype.sadb_protocol_exttype = SADB_X_EXT_FLOW_TYPE;
flowtype.sadb_protocol_len = sizeof flowtype / PF_KEY_V2_CHUNK;
flowtype.sadb_protocol_direction
@@ -1230,7 +1231,11 @@ pf_key_v2_flow (in_addr_t laddr, in_addr_t lmask, in_addr_t raddr,
* XXX Addresses have to be thought through. Assumes IPv4.
*/
len = sizeof *addr + PF_KEY_V2_ROUND (sizeof (struct sockaddr_in));
+#ifdef SADB_X_EXT_FLOW_TYPE
if (!delete || ingress)
+#else
+ if (!delete)
+#endif /* SADB_X_EXT_FLOW_TYPE */
{
addr = malloc (len);
if (!addr)