diff options
author | Marc Kleine-Budde <mkl@pengutronix.de> | 2013-10-08 01:19:58 +0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-11-04 16:23:40 +0400 |
commit | 5468ba5515e2720cfe19d0c35d481cb4cb97a8aa (patch) | |
tree | 8d9dc86bae8bc73bdcabef341ab624a6e1eba278 /net/8021q | |
parent | 0a8a2e325e1badbf4dd5243b9368838b0e9ad0e4 (diff) | |
download | linux-5468ba5515e2720cfe19d0c35d481cb4cb97a8aa.tar.xz |
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/8021q')
-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 50711368ad6a..7f046b4c06bc 100644 --- a/net/8021q/vlan_netlink.c +++ b/net/8021q/vlan_netlink.c @@ -152,7 +152,7 @@ static size_t vlan_get_size(const struct net_device *dev) struct vlan_dev_priv *vlan = vlan_dev_priv(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); } |