lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240110133333.GA24888@breakpoint.cc>
Date: Wed, 10 Jan 2024 14:33:33 +0100
From: Florian Westphal <fw@...len.de>
To: Pavel Tikhomirov <ptikhomirov@...tuozzo.com>
Cc: "David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	Florian Westphal <fw@...len.de>, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org, kernel@...nvz.org
Subject: Re: [PATCH 1/4] netfilter: nfnetlink_log: use proper helper for
 fetching physinif

Pavel Tikhomirov <ptikhomirov@...tuozzo.com> wrote:
> We don't use physindev in __build_packet_message except for getting
> physinif from it. So let's switch to nf_bridge_get_physinif to get what
> we want directly.
> 
> Signed-off-by: Pavel Tikhomirov <ptikhomirov@...tuozzo.com>
> ---
>  net/netfilter/nfnetlink_log.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/net/netfilter/nfnetlink_log.c b/net/netfilter/nfnetlink_log.c
> index f03f4d4d7d889..134e05d31061e 100644
> --- a/net/netfilter/nfnetlink_log.c
> +++ b/net/netfilter/nfnetlink_log.c
> @@ -508,7 +508,7 @@ __build_packet_message(struct nfnl_log_net *log,
>  					 htonl(br_port_get_rcu(indev)->br->dev->ifindex)))
>  				goto nla_put_failure;
>  		} else {
> -			struct net_device *physindev;
> +			int physinif;
>  
>  			/* Case 2: indev is bridge group, we need to look for
>  			 * physical device (when called from ipv4) */
> @@ -516,10 +516,10 @@ __build_packet_message(struct nfnl_log_net *log,
>  					 htonl(indev->ifindex)))
>  				goto nla_put_failure;
>  
> -			physindev = nf_bridge_get_physindev(skb);
> -			if (physindev &&
> +			physinif = nf_bridge_get_physinif(skb);
> +			if (physinif &&
>  			    nla_put_be32(inst->skb, NFULA_IFINDEX_PHYSINDEV,
> -					 htonl(physindev->ifindex)))
> +					 htonl(physinif)))

I think you can drop this patch and make the last patch pass
nf_bridge_info->physinif directly.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ