summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsashan <sashan@openbsd.org>2018-07-12 14:28:07 +0000
committersashan <sashan@openbsd.org>2018-07-12 14:28:07 +0000
commit18b958d7c909bdbfe776230b721e495c40787279 (patch)
tree8ae15fa4f6be5fc49b6d7766ab2ec47588f0d7c6
parentUnbreak the nmi handler (again): I placed INTR_CLEAR_GPRS in the wrong (diff)
downloadwireguard-openbsd-18b958d7c909bdbfe776230b721e495c40787279.tar.xz
wireguard-openbsd-18b958d7c909bdbfe776230b721e495c40787279.zip
trade few 'goto unlock: for 'break' in pf_test()
OK mpi@, OK henning@, OK jca@
-rw-r--r--sys/net/pf.c11
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();
/*