Skip to content

Commit

Permalink
net: vrf: Fix setting NLM_F_EXCL flag when adding l3mdev rule
Browse files Browse the repository at this point in the history
Only need 1 l3mdev FIB rule. Fix setting NLM_F_EXCL in the nlmsghdr.

Fixes: 1aa6c4f ("net: vrf: Add l3mdev rules on first device create")
Signed-off-by: David Ahern <dsa@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David Ahern authored and David S. Miller committed Apr 17, 2017
1 parent b47a57a commit 426c87c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/vrf.c
Original file line number Diff line number Diff line change
Expand Up @@ -1128,7 +1128,7 @@ static int vrf_fib_rule(const struct net_device *dev, __u8 family, bool add_it)
goto nla_put_failure;

/* rule only needs to appear once */
nlh->nlmsg_flags &= NLM_F_EXCL;
nlh->nlmsg_flags |= NLM_F_EXCL;

frh = nlmsg_data(nlh);
memset(frh, 0, sizeof(*frh));
Expand Down

0 comments on commit 426c87c

Please sign in to comment.