Skip to content

Commit

Permalink
net: vlan: fix nlmsg size calculation in vlan_get_size()
Browse files Browse the repository at this point in the history
This patch fixes the calculation of the nlmsg size, by adding the missing
nla_total_size().

Cc: Patrick McHardy <kaber@trash.net>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Marc Kleine-Budde authored and David S. Miller committed Oct 8, 2013
1 parent ede869c commit c33a39c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/8021q/vlan_netlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit c33a39c

Please sign in to comment.