summaryrefslogtreecommitdiff
path: root/sys/net
diff options
context:
space:
mode:
authorMarkus Friedl <markus@cvs.openbsd.org>2004-12-11 15:59:01 +0000
committerMarkus Friedl <markus@cvs.openbsd.org>2004-12-11 15:59:01 +0000
commit5f5e5f56683cf0c80c19b3e7ba24d6d9a6af26b0 (patch)
tree2c597ec47359ef32c17027809d4fd84527827c01 /sys/net
parent8d3c9ae8c7f93f310e261d6376721a699fa68653 (diff)
pass out the correct lifetime type on expire
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/pfkeyv2.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/net/pfkeyv2.c b/sys/net/pfkeyv2.c
index 0f10302be26..1f225e65591 100644
--- a/sys/net/pfkeyv2.c
+++ b/sys/net/pfkeyv2.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pfkeyv2.c,v 1.97 2004/12/11 15:55:57 markus Exp $ */
+/* $OpenBSD: pfkeyv2.c,v 1.98 2004/12/11 15:59:00 markus Exp $ */
/*
* @(#)COPYRIGHT 1.1 (NRL) 17 January 1995
@@ -2122,9 +2122,8 @@ pfkeyv2_expire(struct tdb *sa, u_int16_t type)
export_lifetime(&p, sa, 2);
headers[type] = p;
- type = (SADB_EXT_LIFETIME_SOFT ? PFKEYV2_LIFETIME_SOFT :
- PFKEYV2_LIFETIME_HARD);
- export_lifetime(&p, sa, type);
+ export_lifetime(&p, sa, type == SADB_EXT_LIFETIME_SOFT ?
+ PFKEYV2_LIFETIME_SOFT : PFKEYV2_LIFETIME_HARD);
headers[SADB_EXT_ADDRESS_SRC] = p;
export_address(&p, (struct sockaddr *) &sa->tdb_src);