Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c33a39c5 authored by Marc Kleine-Budde's avatar Marc Kleine-Budde Committed by David S. Miller
Browse files

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 <kaber@trash.net>
Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ede869cd
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);
}