fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git] / net / 8021q / vlan_dev.c
index 0f604d2..425912a 100644 (file)
@@ -62,7 +62,7 @@ int vlan_dev_rebuild_header(struct sk_buff *skb)
        default:
                printk(VLAN_DBG
                       "%s: unable to resolve type %X addresses.\n", 
-                      dev->name, (int)veth->h_vlan_encapsulated_proto);
+                      dev->name, ntohs(veth->h_vlan_encapsulated_proto));
         
                memcpy(veth->h_source, dev->dev_addr, ETH_ALEN);
                break;
@@ -163,10 +163,8 @@ int vlan_skb_recv(struct sk_buff *skb, struct net_device *dev,
        stats->rx_packets++;
        stats->rx_bytes += skb->len;
 
-       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);
+       /* Take off the VLAN header (4 bytes currently) */
+       skb_pull_rcsum(skb, VLAN_HLEN);
 
        /* Ok, lets check to make sure the device (dev) we
         * came in on is what this VLAN is attached to.
@@ -382,6 +380,9 @@ int vlan_dev_hard_header(struct sk_buff *skb, struct net_device *dev,
                } else {
                        vhdr->h_vlan_encapsulated_proto = htons(len);
                }
+
+               skb->protocol = htons(ETH_P_8021Q);
+               skb->nh.raw = skb->data;
        }
 
        /* Before delegating work to the lower layer, enter our MAC-address */