From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeff Kirsher Subject: [net-2.6 PATCH 1/3] net: fix vlan_get_size to include vlan_flags size Date: Fri, 25 Sep 2009 16:11:24 -0700 Message-ID: <20090925231124.23450.94680.stgit@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, gospo@redhat.com, John Fastabend , Jeff Kirsher To: davem@davemloft.net Return-path: Received: from qmta02.westchester.pa.mail.comcast.net ([76.96.62.24]:60822 "EHLO QMTA02.westchester.pa.mail.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752693AbZIYXLj (ORCPT ); Fri, 25 Sep 2009 19:11:39 -0400 Sender: netdev-owner@vger.kernel.org List-ID: From: John Fastabend Fix vlan_get_size to include vlan->flags. Currently, the size of the vlan flags is not included in the nlmsg size. Signed-off-by: John Fastabend Signed-off-by: Jeff Kirsher --- net/8021q/vlan_netlink.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/net/8021q/vlan_netlink.c b/net/8021q/vlan_netlink.c index 343146e..a915048 100644 --- a/net/8021q/vlan_netlink.c +++ b/net/8021q/vlan_netlink.c @@ -169,6 +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 */ vlan_qos_map_size(vlan->nr_ingress_mappings) + vlan_qos_map_size(vlan->nr_egress_mappings); }