All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: Antoine Tenart <atenart@kernel.org>
Cc: pablo@netfilter.org, kadlec@netfilter.org, dsahern@kernel.org,
	menglong8.dong@gmail.com, netfilter-devel@vger.kernel.org,
	netdev@vger.kernel.org
Subject: Re: [PATCH nf-next] netfilter: br_netfilter: remove unused conditional and dead code
Date: Thu, 9 Jan 2025 15:18:18 +0000	[thread overview]
Message-ID: <20250109151818.GH7706@kernel.org> (raw)
In-Reply-To: <20250109093710.494322-1-atenart@kernel.org>

On Thu, Jan 09, 2025 at 10:37:09AM +0100, Antoine Tenart wrote:
> The SKB_DROP_REASON_IP_INADDRERRORS drop reason is never returned from
> any function, as such it cannot be returned from the ip_route_input call
> tree. The 'reason != SKB_DROP_REASON_IP_INADDRERRORS' conditional is
> thus always true.
> 
> Looking back at history, commit 50038bf38e65 ("net: ip: make
> ip_route_input() return drop reasons") changed the ip_route_input
> returned value check in br_nf_pre_routing_finish from -EHOSTUNREACH to
> SKB_DROP_REASON_IP_INADDRERRORS. It turns out -EHOSTUNREACH could not be
> returned either from the ip_route_input call tree and this since commit
> 251da4130115 ("ipv4: Cache ip_error() routes even when not
> forwarding.").
> 
> Not a fix as this won't change the behavior. While at it use
> kfree_skb_reason.
> 
> Signed-off-by: Antoine Tenart <atenart@kernel.org>
> ---
>  net/bridge/br_netfilter_hooks.c | 30 +-----------------------------
>  1 file changed, 1 insertion(+), 29 deletions(-)

Nice diffstat :)

Reviewed-by: Simon Horman <horms@kernel.org>

      reply	other threads:[~2025-01-09 15:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-09  9:37 [PATCH nf-next] netfilter: br_netfilter: remove unused conditional and dead code Antoine Tenart
2025-01-09 15:18 ` Simon Horman [this message]

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=20250109151818.GH7706@kernel.org \
    --to=horms@kernel.org \
    --cc=atenart@kernel.org \
    --cc=dsahern@kernel.org \
    --cc=kadlec@netfilter.org \
    --cc=menglong8.dong@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.