Skip to content

Commit

Permalink
[VLAN]: Fix hardware rx csum errors
Browse files Browse the repository at this point in the history
Receiving VLAN packets over a device (without VLAN assist) that is
doing hardware checksumming (CHECKSUM_HW), causes errors because the
VLAN code forgets to adjust the hardware checksum.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Stephen Hemminger authored and David S. Miller committed Dec 15, 2005
1 parent 2824764 commit a388442
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions net/8021q/vlan_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,9 @@ int vlan_skb_recv(struct sk_buff *skb, struct net_device *dev,

skb_pull(skb, VLAN_HLEN); /* take off the VLAN header (4 bytes currently) */

/* Need to correct hardware checksum */
skb_postpull_rcsum(skb, vhdr, VLAN_HLEN);

/* Ok, lets check to make sure the device (dev) we
* came in on is what this VLAN is attached to.
*/
Expand Down

0 comments on commit a388442

Please sign in to comment.