From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Linkui Xiao <xiaolinkui@126.com>
Cc: fw@strlen.de, phil@nwl.cc, davem@davemloft.net,
edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
horms@kernel.org, netfilter-devel@vger.kernel.org,
coreteam@netfilter.org, netdev@vger.kernel.org,
Linkui Xiao <xiaolinkui@kylinos.cn>
Subject: Re: [PATCH] netfilter: osf: remove unreachable break in nf_osf_ttl()
Date: Fri, 21 Aug 2026 11:32:49 +0200 [thread overview]
Message-ID: <aogbQZyLQonPE-GV@chamomile> (raw)
In-Reply-To: <20260821022817.153861-1-xiaolinkui@126.com>
On Fri, Aug 21, 2026 at 10:28:17AM +0800, Linkui Xiao wrote:
> From: Linkui Xiao <xiaolinkui@kylinos.cn>
>
> In nf_osf_ttl(), the break statement after return in NF_OSF_TTL_TRUE
> case is unreachable dead‑code. The return statement exits the function
> immediately, so break will never execute.
>
> Remove the useless break, no functional change.
Please, use [PATCH nf-next] to specify this goes to the netfilter tree.
Thanks.
> Signed-off-by: Linkui Xiao <xiaolinkui@kylinos.cn>
> ---
> net/netfilter/nfnetlink_osf.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/net/netfilter/nfnetlink_osf.c b/net/netfilter/nfnetlink_osf.c
> index 92002079f8ea..a3f855905d52 100644
> --- a/net/netfilter/nfnetlink_osf.c
> +++ b/net/netfilter/nfnetlink_osf.c
> @@ -36,7 +36,6 @@ static inline int nf_osf_ttl(const struct sk_buff *skb,
> switch (ttl_check) {
> case NF_OSF_TTL_TRUE:
> return ip->ttl == f_ttl;
> - break;
> case NF_OSF_TTL_NOCHECK:
> return 1;
> case NF_OSF_TTL_LESS:
> --
> 2.25.1
>
next prev parent reply other threads:[~2026-08-21 9:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-21 2:28 [PATCH] netfilter: osf: remove unreachable break in nf_osf_ttl() Linkui Xiao
2026-08-21 9:32 ` Pablo Neira Ayuso [this message]
2026-08-21 9:50 ` Xuanqiang Luo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aogbQZyLQonPE-GV@chamomile \
--to=pablo@netfilter.org \
--cc=coreteam@netfilter.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=fw@strlen.de \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=phil@nwl.cc \
--cc=xiaolinkui@126.com \
--cc=xiaolinkui@kylinos.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox