diff options
author | 2001-08-05 11:03:07 +0000 | |
---|---|---|
committer | 2001-08-05 11:03:07 +0000 | |
commit | eb22d81e88f69bba30efe0ebc6faf3865be61c5f (patch) | |
tree | 339b9be7b0377c0dc33bead2dc4f43bf53d31e87 /sys/net/pfkeyv2.c | |
parent | Only flush the policies if the message type is UNSPEC. (diff) | |
download | wireguard-openbsd-eb22d81e88f69bba30efe0ebc6faf3865be61c5f.tar.xz wireguard-openbsd-eb22d81e88f69bba30efe0ebc6faf3865be61c5f.zip |
Actually, move the check inside the switch.
Diffstat (limited to 'sys/net/pfkeyv2.c')
-rw-r--r-- | sys/net/pfkeyv2.c | 15 |
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: |