MAINTAINERS: update PPPoE maintainer address
[safe/jmp/linux-2.6] / net / 8021q / vlan_dev.c
index 1e5c990..5d055c2 100644 (file)
@@ -153,9 +153,6 @@ int vlan_skb_recv(struct sk_buff *skb, struct net_device *dev,
        struct net_device_stats *stats;
        unsigned short vlan_TCI;
 
-       if (dev->nd_net != &init_net)
-               goto err_free;
-
        skb = skb_share_check(skb, GFP_ATOMIC);
        if (skb == NULL)
                goto err_free;
@@ -660,12 +657,14 @@ static int vlan_dev_init(struct net_device *dev)
        int subclass = 0;
 
        /* IFF_BROADCAST|IFF_MULTICAST; ??? */
-       dev->flags  = real_dev->flags & ~IFF_UP;
+       dev->flags  = real_dev->flags & ~(IFF_UP | IFF_PROMISC | IFF_ALLMULTI);
        dev->iflink = real_dev->ifindex;
        dev->state  = (real_dev->state & ((1<<__LINK_STATE_NOCARRIER) |
                                          (1<<__LINK_STATE_DORMANT))) |
                      (1<<__LINK_STATE_PRESENT);
 
+       dev->features |= real_dev->features & real_dev->vlan_features;
+
        /* ipv6 shared card related stuff */
        dev->dev_id = real_dev->dev_id;
 
@@ -692,6 +691,20 @@ static int vlan_dev_init(struct net_device *dev)
        return 0;
 }
 
+static void vlan_dev_uninit(struct net_device *dev)
+{
+       struct vlan_priority_tci_mapping *pm;
+       struct vlan_dev_info *vlan = vlan_dev_info(dev);
+       int i;
+
+       for (i = 0; i < ARRAY_SIZE(vlan->egress_priority_map); i++) {
+               while ((pm = vlan->egress_priority_map[i]) != NULL) {
+                       vlan->egress_priority_map[i] = pm->next;
+                       kfree(pm);
+               }
+       }
+}
+
 void vlan_setup(struct net_device *dev)
 {
        ether_setup(dev);
@@ -701,6 +714,7 @@ void vlan_setup(struct net_device *dev)
 
        dev->change_mtu         = vlan_dev_change_mtu;
        dev->init               = vlan_dev_init;
+       dev->uninit             = vlan_dev_uninit;
        dev->open               = vlan_dev_open;
        dev->stop               = vlan_dev_stop;
        dev->set_mac_address    = vlan_dev_set_mac_address;