Commit aece024e authored by Sabrina Dubroca's avatar Sabrina Dubroca Committed by Greg Kroah-Hartman

rtnetlink: fix FDB size computation

[ Upstream commit f82ef3e1 ]

Add missing NDA_VLAN attribute's size.

Fixes: 1e53d5bb ("net: Pass VLAN ID to rtnl_fdb_notify.")
Signed-off-by: default avatarSabrina Dubroca <sd@queasysnail.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 6ef59b98
......@@ -2600,7 +2600,10 @@ static int nlmsg_populate_fdb_fill(struct sk_buff *skb,
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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment