netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: vlan: fix nlmsg size calculation in vlan_get_size()
@ 2013-10-07 21:19 Marc Kleine-Budde
  2013-10-08 20:53 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Marc Kleine-Budde @ 2013-10-07 21:19 UTC (permalink / raw)
  To: netdev; +Cc: kernel, Marc Kleine-Budde, Patrick McHardy

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>
---
 net/8021q/vlan_netlink.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/8021q/vlan_netlink.c b/net/8021q/vlan_netlink.c
index 3091297..c7e634a 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);
 }
-- 
1.8.4.rc3

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] net: vlan: fix nlmsg size calculation in vlan_get_size()
  2013-10-07 21:19 [PATCH] net: vlan: fix nlmsg size calculation in vlan_get_size() Marc Kleine-Budde
@ 2013-10-08 20:53 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2013-10-08 20:53 UTC (permalink / raw)
  To: mkl; +Cc: netdev, kernel, kaber

From: Marc Kleine-Budde <mkl@pengutronix.de>
Date: Mon,  7 Oct 2013 23:19:58 +0200

> 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>

Applied.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-10-08 20:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-07 21:19 [PATCH] net: vlan: fix nlmsg size calculation in vlan_get_size() Marc Kleine-Budde
2013-10-08 20:53 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).