From: Marc Kleine-Budde Date: Mon, 7 Oct 2013 21:19:58 +0000 (+0200) Subject: net: vlan: fix nlmsg size calculation in vlan_get_size() X-Git-Tag: MMI-PSA29.97-13-9~13424^2~52 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c33a39c575068c2ea9bffb22fd6de2df19c74b89;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git net: vlan: fix nlmsg size calculation in vlan_get_size() This patch fixes the calculation of the nlmsg size, by adding the missing nla_total_size(). Cc: Patrick McHardy Signed-off-by: Marc Kleine-Budde Signed-off-by: David S. Miller --- diff --git a/net/8021q/vlan_netlink.c b/net/8021q/vlan_netlink.c index 309129732285..c7e634af8516 100644 --- a/net/8021q/vlan_netlink.c +++ b/net/8021q/vlan_netlink.c @@ -171,7 +171,7 @@ static size_t vlan_get_size(const struct net_device *dev) return nla_total_size(2) + /* IFLA_VLAN_PROTOCOL */ nla_total_size(2) + /* IFLA_VLAN_ID */ - sizeof(struct ifla_vlan_flags) + /* IFLA_VLAN_FLAGS */ + nla_total_size(sizeof(struct ifla_vlan_flags)) + /* IFLA_VLAN_FLAGS */ vlan_qos_map_size(vlan->nr_ingress_mappings) + vlan_qos_map_size(vlan->nr_egress_mappings); }