From nobody Mon Jun 30 09:54:38 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4bW1jC2XZNz60GHW; Mon, 30 Jun 2025 09:54:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bW1jB41yJz3f7g; Mon, 30 Jun 2025 09:54:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1751277278; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EI8mKzBMa96bKMpN+A3szOviIgqa/DHtQUIKMT57Gso=; b=HVF1RvD0m5jYvFO7OcQa1MIcO4kGKdCudmkq+PMe2uBjd8pzceb53P93NaFRn2FN/A8QOS neBWpC223qEYBrmEWyDr8sj98E1lMtSLD0tFOURuimCDFk4DL4An4MhKKi3v48tSkxMjEP PZrb+U0N18DjZ/Te1CoNPD5xPX3JzklemHf2pWUX7Oe7kLPn7FvV1NLH0OKt4u1gSyFQaP 4Bpg7EwYKJGG4H63LJhSlPYzEzu3dFLOq0vIcDFHZtcmcb9xLOoFpvkiZJN7pIjF1PC006 rBhNMrDJ+WAmDZP0Bv7sqa0oyIq7AfYhioTUBfn95095By9o8CEyQyEO/8192Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1751277278; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EI8mKzBMa96bKMpN+A3szOviIgqa/DHtQUIKMT57Gso=; b=J5vzotmgBr8U5oXNK7noOPh182PCVV0noyKXB/FPtMLq4hFw3SP1nDsB3jg+IqYH/37xKy 2HBFZy+L+Sy6G1te7qIoBEJwBpykdMkbCc2xnvOJOQ6NnS0AbX8cAssmVjMokt31wga1ab yJDUrlQECszNE8wB/cEKSFebBPyeFGinYF7pmneqR249RGOrT+w/50NM8kQAgrH1Nk15OH xMBhLK14RnOeg7WKDfw/RosK5j0GYQsqmciE8MH7hFz+YAtkwjZa0tgKpZIg7cB5hvhFCD tfszMo19uuG70C6k7lOV1qElE9S+1UeYivyLy+YY8wUAty2fLNktGLST2Jk6QQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1751277278; a=rsa-sha256; cv=none; b=S5bNy331/3Ir/+VZZnu56DnSyZck09CK3j2c1RLeDFL+va6cM0iKLmiN2T/bVa9Ja/3hGt jJmbxfJvvmggi6Z5uoHtuka7/iXOnl2ucB/rpOhupdeu3jR1Hvsueddo4lAGtj2aya1fN0 2PPiXZ3z1hVf3m/GEiQxIzoqkq3x/mqrWO1Zh/nAMiRrPwQkZ14MlzXNBCmPpjoKKXnyq1 cpHwEQ/PpAj1V7WLrpazuOh00LgQ07i8x5ktmVmEg0OKOKlJSUDO+Ia/d3DYocc8N7BuFJ FbrXChbUz8o1u/EsODTd46hxpWPkl/oYwzAP6wXtfnvE/uJE5TMQfVeBNWOwuw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bW1jB31ktz10SP; Mon, 30 Jun 2025 09:54:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 55U9scp5064458; Mon, 30 Jun 2025 09:54:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 55U9sc9j064454; Mon, 30 Jun 2025 09:54:38 GMT (envelope-from git) Date: Mon, 30 Jun 2025 09:54:38 GMT Message-Id: <202506300954.55U9sc9j064454@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: d18ed24a9e9b - main - pf: trade few 'goto unlock: for 'break' in pf_test() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d18ed24a9e9b156770391afad92f32fe860a7ca9 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=d18ed24a9e9b156770391afad92f32fe860a7ca9 commit d18ed24a9e9b156770391afad92f32fe860a7ca9 Author: Kristof Provost AuthorDate: 2025-06-27 08:28:05 +0000 Commit: Kristof Provost CommitDate: 2025-06-30 07:53:27 +0000 pf: trade few 'goto unlock: for 'break' in pf_test() OK mpi@, OK henning@, OK jca@ Obtained from: OpenBSD, sashan , 18b958d7c9 Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/netpfil/pf/pf.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 41fd8a441a05..b24bbe036141 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -10593,7 +10593,7 @@ pf_test(sa_family_t af, int dir, int pflags, struct ifnet *ifp, struct mbuf **m0 use_2nd_queue = 1; action = pf_normalize_tcp(&pd); if (action == PF_DROP) - goto done; + break; action = pf_test_state(&s, &pd, &reason); if (action == PF_PASS || action == PF_AFRT) { if (V_pfsync_update_state_ptr != NULL) @@ -10642,7 +10642,7 @@ pf_test(sa_family_t af, int dir, int pflags, struct ifnet *ifp, struct mbuf **m0 case IPPROTO_SCTP: action = pf_normalize_sctp(&pd); if (action == PF_DROP) - goto done; + break; /* fallthrough */ case IPPROTO_UDP: default: @@ -10665,14 +10665,14 @@ pf_test(sa_family_t af, int dir, int pflags, struct ifnet *ifp, struct mbuf **m0 REASON_SET(&reason, PFRES_NORM); DPFPRINTF(PF_DEBUG_MISC, ("dropping IPv6 packet with ICMPv4 payload")); - goto done; + break; } if (pd.virtual_proto == IPPROTO_ICMPV6 && af != AF_INET6) { action = PF_DROP; REASON_SET(&reason, PFRES_NORM); DPFPRINTF(PF_DEBUG_MISC, ("pf: dropping IPv4 packet with ICMPv6 payload\n")); - goto done; + break; } action = pf_test_state_icmp(&s, &pd, &reason); if (action == PF_PASS || action == PF_AFRT) {