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: <20150826001132.GA15428@ketchup.mtl.sfl>
Date:	Tue, 25 Aug 2015 20:11:32 -0400
From:	Vivien Didelot <vivien.didelot@...oirfairelinux.com>
To:	netdev@...r.kernel.org
Cc:	linux-kernel@...r.kernel.org, kernel@...oirfairelinux.com,
	"David S. Miller" <davem@...emloft.net>,
	Guenter Roeck <linux@...ck-us.net>,
	Andrew Lunn <andrew@...n.ch>,
	Florian Fainelli <f.fainelli@...il.com>
Subject: Re: [PATCH net] net: dsa: fix EDSA frame from hwaccel frame

Hi All,

On Aug. Tuesday 04 (32) 02:35 AM, Vivien Didelot wrote:
> If the underlying network device features NETIF_F_HW_VLAN_CTAG_TX,
> an EDSA frame is prepended with a 802.1q header once queued.
> 
> To fix this, push the VLAN tag to the payload if present, before
> checking the frame protocol.
> 
> [note: we may prefer to access directly VLAN TCI from hwaccel frames,
> but this approach is simpler.]
> 
> Signed-off-by: Vivien Didelot <vivien.didelot@...oirfairelinux.com>
> ---
>  net/dsa/tag_edsa.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/net/dsa/tag_edsa.c b/net/dsa/tag_edsa.c
> index 2288c80..3ada4eb 100644
> --- a/net/dsa/tag_edsa.c
> +++ b/net/dsa/tag_edsa.c
> @@ -9,6 +9,7 @@
>   */
>  
>  #include <linux/etherdevice.h>
> +#include <linux/if_vlan.h>
>  #include <linux/list.h>
>  #include <linux/slab.h>
>  #include "dsa_priv.h"
> @@ -21,6 +22,10 @@ static struct sk_buff *edsa_xmit(struct sk_buff *skb, struct net_device *dev)
>  	struct dsa_slave_priv *p = netdev_priv(dev);
>  	u8 *edsa_header;
>  
> +	skb = vlan_hwaccel_push_inside(skb);
> +	if (unlikely(!skb))
> +		return NULL;
> +
>  	/*
>  	 * Convert the outermost 802.1q tag to a DSA tag and prepend
>  	 * a DSA ethertype field is the packet is tagged, or insert
> -- 
> 2.4.6
> 

Did someone have a chance to give this a look?

Thanks,
-v
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ