summaryrefslogtreecommitdiff
path: root/net/core/rtnetlink.c
diff options
context:
space:
mode:
authorSabrina Dubroca <sd@queasysnail.net>2016-11-18 17:50:39 +0300
committerDavid S. Miller <davem@davemloft.net>2016-11-18 22:09:42 +0300
commitf82ef3e10a870acc19fa04f80ef5877eaa26f41e (patch)
treee81dae73d8f6b3b513e12457ae3eaade5f3585b2 /net/core/rtnetlink.c
parent0f5258cd91e9d78a1ee30696314bec3c33321a93 (diff)
downloadlinux-f82ef3e10a870acc19fa04f80ef5877eaa26f41e.tar.xz
rtnetlink: fix FDB size computation
Add missing NDA_VLAN attribute's size. Fixes: 1e53d5bb8878 ("net: Pass VLAN ID to rtnl_fdb_notify.") Signed-off-by: Sabrina Dubroca <sd@queasysnail.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/rtnetlink.c')
-rw-r--r--net/core/rtnetlink.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index a6529c55ffb7..2b9d7d08ed4d 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -2852,7 +2852,10 @@ nla_put_failure:
static inline size_t rtnl_fdb_nlmsg_size(void)
{
- return NLMSG_ALIGN(sizeof(struct ndmsg)) + nla_total_size(ETH_ALEN);
+ return NLMSG_ALIGN(sizeof(struct ndmsg)) +
+ nla_total_size(ETH_ALEN) + /* NDA_LLADDR */
+ nla_total_size(sizeof(u16)) + /* NDA_VLAN */
+ 0;
}
static void rtnl_fdb_notify(struct net_device *dev, u8 *addr, u16 vid, int type,