Skip to content

Commit

Permalink
net: fix vlan_get_size to include vlan_flags size
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Jeff Kirsher <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
John Fastabend authored and davem330 committed Sep 27, 2009
1 parent a71b4f5 commit fc482cc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions net/8021q/vlan_netlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
sizeof(struct ifla_vlan_flags) + /* IFLA_VLAN_FLAGS */
vlan_qos_map_size(vlan->nr_ingress_mappings) +
vlan_qos_map_size(vlan->nr_egress_mappings);
}
Expand Down

0 comments on commit fc482cc

Please sign in to comment.