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: <7dee9e67-bad5-84eb-9ff1-fa0d0aef8be0@lab.ntt.co.jp>
Date:   Tue, 15 Jan 2019 15:11:28 +0900
From:   Toshiaki Makita <makita.toshiaki@....ntt.co.jp>
To:     Zahari Doychev <zahari.doychev@...ux.com>, netdev@...r.kernel.org,
        bridge@...ts.linux-foundation.org, nikolay@...ulusnetworks.com,
        roopa@...ulusnetworks.com
Cc:     johannes@...solutions.net, jhs@...atatu.com
Subject: Re: [Bridge] [PATCH 1/2] net: bridge: fix tc added QinQ forwarding

On 2019/01/13 22:59, Zahari Doychev wrote:
> Use the skb->mac_len instead of using the ETH_HLEN when pushing the skb
> data pointer. This fixes sending incorrect packets when more than one
> vlan tags are pushed by tc-vlan and the mac header length is bigger than
> ETH_HLEN. In this way the vlan tagged contained in the skb is inserted at
> right offset in the packet payload before sending the packet.
> 
> Signed-off-by: Zahari Doychev <zahari.doychev@...ux.com>
> ---
>  net/bridge/br_forward.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/net/bridge/br_forward.c b/net/bridge/br_forward.c
> index 5372e2042adf..55f928043f77 100644
> --- a/net/bridge/br_forward.c
> +++ b/net/bridge/br_forward.c
> @@ -39,7 +39,7 @@ int br_dev_queue_push_xmit(struct net *net, struct sock *sk, struct sk_buff *skb
>  	if (!is_skb_forwardable(skb->dev, skb))
>  		goto drop;
>  
> -	skb_push(skb, ETH_HLEN);
> +	skb_push(skb, skb->mac_len);
>  	br_drop_fake_rtable(skb);
>  
>  	if (skb->ip_summed == CHECKSUM_PARTIAL &&
> 

I guess you mean skb->data points to mac_header + ETH_HLEN + VLAN_HLEN
when bridge receives skbs in br_handle_frame()?
If so, the behavior of act_vlan is odd. Normal double tagged skbs from
hardware devices should have skb->data pointing to mac_header + ETH_HLEN
because they just call eth_type_trans() before entering
netif_receive_skb()...
I think act_vlan needs some fix.

-- 
Toshiaki Makita

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ