summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAngelos D. Keromytis <angelos@cvs.openbsd.org>2001-08-05 11:03:08 +0000
committerAngelos D. Keromytis <angelos@cvs.openbsd.org>2001-08-05 11:03:08 +0000
commit8ec824798ec0e12d55b89337ebd1b3ce35ac985f (patch)
treeae29a6b7b335e02e54081f83a6616c21a63d576c
parente95106ae90c36e56ba7d18fa6cb82cc1c00b40a9 (diff)
Actually, move the check inside the switch.
-rw-r--r--sys/net/pfkeyv2.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/sys/net/pfkeyv2.c b/sys/net/pfkeyv2.c
index 9e4b5753657..123be415ca4 100644
--- a/sys/net/pfkeyv2.c
+++ b/sys/net/pfkeyv2.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pfkeyv2.c,v 1.76 2001/08/05 11:02:03 angelos Exp $ */
+/* $OpenBSD: pfkeyv2.c,v 1.77 2001/08/05 11:03:07 angelos Exp $ */
/*
* @(#)COPYRIGHT 1.1 (NRL) 17 January 1995
@@ -1263,17 +1263,14 @@ pfkeyv2_send(struct socket *socket, void *message, int len)
case SADB_FLUSH:
rval = 0;
- if (smsg->sadb_msg_satype == SADB_SATYPE_UNSPEC)
- {
- s = spltdb();
- while ((ipo = TAILQ_FIRST(&ipsec_policy_head)) != NULL)
- ipsec_delete_policy(ipo);
- splx(s);
- }
-
switch(smsg->sadb_msg_satype)
{
case SADB_SATYPE_UNSPEC:
+ s = spltdb();
+ while ((ipo = TAILQ_FIRST(&ipsec_policy_head)) != NULL)
+ ipsec_delete_policy(ipo);
+ splx(s);
+ /* Fall through */
case SADB_SATYPE_AH:
case SADB_SATYPE_ESP:
case SADB_X_SATYPE_IPIP: