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] [day] [month] [year] [list]
Message-ID: <547a00ff-cc4a-05de-b3c5-14266a3b90e5@nvidia.com>
Date:   Thu, 14 Jan 2021 19:51:17 +0200
From:   Nikolay Aleksandrov <nikolay@...dia.com>
To:     <menglong8.dong@...il.com>, <kuba@...nel.org>
CC:     <roopa@...dia.com>, <davem@...emloft.net>,
        <bridge@...ts.linux-foundation.org>, <netdev@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>,
        Menglong Dong <dong.menglong@....com.cn>
Subject: Re: [PATCH net-next] net: bridge: use eth_type_vlan in
 br_dev_queue_push_xmit

On 14/01/2021 09:51, menglong8.dong@...il.com wrote:
> From: Menglong Dong <dong.menglong@....com.cn>
> 
> Replace the check for ETH_P_8021Q and ETH_P_8021AD in
> br_dev_queue_push_xmit with eth_type_vlan.
> 
> Signed-off-by: Menglong Dong <dong.menglong@....com.cn>
> ---
>  net/bridge/br_forward.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/net/bridge/br_forward.c b/net/bridge/br_forward.c
> index e28ffadd1371..6e9b049ae521 100644
> --- a/net/bridge/br_forward.c
> +++ b/net/bridge/br_forward.c
> @@ -39,8 +39,7 @@ int br_dev_queue_push_xmit(struct net *net, struct sock *sk, struct sk_buff *skb
>  	br_drop_fake_rtable(skb);
>  
>  	if (skb->ip_summed == CHECKSUM_PARTIAL &&
> -	    (skb->protocol == htons(ETH_P_8021Q) ||
> -	     skb->protocol == htons(ETH_P_8021AD))) {
> +	    eth_type_vlan(skb->protocol)) {
>  		int depth;
>  
>  		if (!__vlan_get_protocol(skb, skb->protocol, &depth))
> 


Please change all similar checks, there are also:
br_netlink.c - br_validate()
br_vlan.c - br_vlan_set_proto()

Thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ