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-next>] [day] [month] [year] [list]
Date:	Mon, 25 Jan 2010 13:16:34 -0800
From:	Sridhar Samudrala <sri@...ibm.com>
To:	David Miller <davem@...emloft.net>,
	Herbert Xu <herbert@...dor.apana.org.au>
Cc:	netdev <netdev@...r.kernel.org>
Subject: [PATCH net-next-2.6] net: Handle vlan packets in skb_gso_segment()

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>

diff --git a/net/core/dev.c b/net/core/dev.c
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -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);
 
	if (unlikely(skb->ip_summed != CHECKSUM_PARTIAL)) {



--
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