diff options
author | Marc Kleine-Budde <mkl@pengutronix.de> | 2013-10-07 23:19:58 +0200 |
---|---|---|
committer | Willy Tarreau <w@1wt.eu> | 2014-05-19 07:53:34 +0200 |
commit | 42a11ea6999d8b9f65fd7a2c472d6c447f359405 (patch) | |
tree | d7dfdf4f632ad7ae088380d886decb25166eadcd | |
parent | c8f1f981492cebde72c8ba8fdf1dd160a8dea908 (diff) |
net: vlan: fix nlmsg size calculation in vlan_get_size()
[ Upstream commit c33a39c575068c2ea9bffb22fd6de2df19c74b89 ]
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>
Signed-off-by: Willy Tarreau <w@1wt.eu>
-rw-r--r-- | net/8021q/vlan_netlink.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/8021q/vlan_netlink.c b/net/8021q/vlan_netlink.c index a91504850195..1f13bcf487b0 100644 --- a/net/8021q/vlan_netlink.c +++ b/net/8021q/vlan_netlink.c @@ -169,7 +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 */ + 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); } |