[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Tue, 02 Feb 2010 07:45:34 -0800 (PST)
From: David Miller <davem@...emloft.net>
To: sri@...ibm.com
Cc: herbert@...dor.apana.org.au, netdev@...r.kernel.org
Subject: Re: [PATCH net-next-2.6] net: Handle vlan packets in
skb_gso_segment()
From: Sridhar Samudrala <sri@...ibm.com>
Date: Mon, 25 Jan 2010 13:16:34 -0800
> Handle VLAN packets in skb_gso_segment(). Currently, when large
> VLAN packets are sent via virtio_net on guest and tun on host,
> skb_gso_segment() fails with EPROTONOSUPPORT.
>
> Signed-off-by: Sridhar Samudrala <sri@...ibm.com>
...
> @@ -1672,6 +1672,12 @@ struct sk_buff *skb_gso_segment(struct sk_buff *skb, int features)
>
> skb_reset_mac_header(skb);
> skb->mac_len = skb->network_header - skb->mac_header;
> + if (ntohs(type) == ETH_P_8021Q) {
> + skb->protocol = vlan_eth_hdr(skb)->h_vlan_encapsulated_proto;
> + type = skb->protocol;
> + skb->mac_len += VLAN_HLEN;
> + skb_set_network_header(skb, skb->mac_len);
> + }
> __skb_pull(skb, skb->mac_len);
>
You can't do this.
Now, VLAN packets that are GSO handled will show up differently to
sniffers than those which do not get GSO handling.
You really can't pop the MAC header and modify the skb->protocol
here.
--
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