]> nv-tegra.nvidia Code Review - linux-2.6.git/commitdiff
net: fix vlan_get_size to include vlan_flags size
authorJohn Fastabend <john.r.fastabend@intel.com>
Fri, 25 Sep 2009 13:11:24 +0000 (13:11 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sun, 27 Sep 2009 03:16:07 +0000 (20:16 -0700)
Fix vlan_get_size to include vlan->flags.  Currently, the
size of the vlan flags is not included in the nlmsg size.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/8021q/vlan_netlink.c

index 343146e1bceb0998e1b2a0804b5a798944669ea5..a91504850195ff91ef178a390492fd50375e25c3 100644 (file)
@@ -169,6 +169,7 @@ static size_t vlan_get_size(const struct net_device *dev)
        struct vlan_dev_info *vlan = vlan_dev_info(dev);
 
        return nla_total_size(2) +      /* IFLA_VLAN_ID */
        struct vlan_dev_info *vlan = vlan_dev_info(dev);
 
        return nla_total_size(2) +      /* IFLA_VLAN_ID */
+              sizeof(struct ifla_vlan_flags) + /* IFLA_VLAN_FLAGS */
               vlan_qos_map_size(vlan->nr_ingress_mappings) +
               vlan_qos_map_size(vlan->nr_egress_mappings);
 }
               vlan_qos_map_size(vlan->nr_ingress_mappings) +
               vlan_qos_map_size(vlan->nr_egress_mappings);
 }