diff options
author | Alexandr Nedvedicky <sashan@cvs.openbsd.org> | 2018-07-12 14:28:08 +0000 |
---|---|---|
committer | Alexandr Nedvedicky <sashan@cvs.openbsd.org> | 2018-07-12 14:28:08 +0000 |
commit | 42d909379ea992d56daee2621f940ba24bf4a370 (patch) | |
tree | 503a39d308d9da405349c2be72ff4fd7b830f812 | |
parent | c2f6e1961a352c86470f966f9e7cc1b8eb97e2f1 (diff) |
trade few 'goto unlock: for 'break' in pf_test()
OK mpi@, OK henning@, OK jca@
-rw-r--r-- | sys/net/pf.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/sys/net/pf.c b/sys/net/pf.c index 10c4906ddd8..00187c9268c 100644 --- a/sys/net/pf.c +++ b/sys/net/pf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pf.c,v 1.1071 2018/07/11 11:39:31 henning Exp $ */ +/* $OpenBSD: pf.c,v 1.1072 2018/07/12 14:28:07 sashan Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -6881,7 +6881,7 @@ pf_test(sa_family_t af, int fwdir, struct ifnet *ifp, struct mbuf **m0) REASON_SET(&reason, PFRES_NORM); DPFPRINTF(LOG_NOTICE, "dropping IPv6 packet with ICMPv4 payload"); - goto unlock; + break; } action = pf_test_state_icmp(&pd, &s, &reason); if (action == PF_PASS || action == PF_AFRT) { @@ -6906,7 +6906,7 @@ pf_test(sa_family_t af, int fwdir, struct ifnet *ifp, struct mbuf **m0) REASON_SET(&reason, PFRES_NORM); DPFPRINTF(LOG_NOTICE, "dropping IPv4 packet with ICMPv6 payload"); - goto unlock; + break; } action = pf_test_state_icmp(&pd, &s, &reason); if (action == PF_PASS || action == PF_AFRT) { @@ -6932,13 +6932,13 @@ pf_test(sa_family_t af, int fwdir, struct ifnet *ifp, struct mbuf **m0) pf_synflood_check(&pd)) { pf_syncookie_send(&pd); action = PF_DROP; - goto unlock; + break; } if ((pd.hdr.tcp.th_flags & TH_ACK) && pd.p_len == 0) pqid = 1; action = pf_normalize_tcp(&pd); if (action == PF_DROP) - goto unlock; + break; } action = pf_test_state(&pd, &s, &reason, 0); if (s == NULL && action != PF_PASS && action != PF_AFRT && @@ -6999,7 +6999,6 @@ pf_test(sa_family_t af, int fwdir, struct ifnet *ifp, struct mbuf **m0) break; } -unlock: PF_UNLOCK(); /* |