Commit b4580d6f authored by David Ahern's avatar David Ahern Committed by Greg Kroah-Hartman

net: vrf: Fix setting NLM_F_EXCL flag when adding l3mdev rule

[ Upstream commit 426c87ca ]

Only need 1 l3mdev FIB rule. Fix setting NLM_F_EXCL in the nlmsghdr.

Fixes: 1aa6c4f6 ("net: vrf: Add l3mdev rules on first device create")
Signed-off-by: default avatarDavid Ahern <dsa@cumulusnetworks.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 8c04e2ac
...@@ -1124,7 +1124,7 @@ static int vrf_fib_rule(const struct net_device *dev, __u8 family, bool add_it) ...@@ -1124,7 +1124,7 @@ static int vrf_fib_rule(const struct net_device *dev, __u8 family, bool add_it)
goto nla_put_failure; goto nla_put_failure;
/* rule only needs to appear once */ /* rule only needs to appear once */
nlh->nlmsg_flags &= NLM_F_EXCL; nlh->nlmsg_flags |= NLM_F_EXCL;
frh = nlmsg_data(nlh); frh = nlmsg_data(nlh);
memset(frh, 0, sizeof(*frh)); memset(frh, 0, sizeof(*frh));
......
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