diff mbox

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

Message ID 20170413165715.10365-1-dsa@cumulusnetworks.com
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

David Ahern April 13, 2017, 4:57 p.m. UTC
Only need 1 l3mdev FIB rule. Fix setting NLM_F_EXCL in the nlmsghdr.

Fixes: 1aa6c4f6b8cd8 ("net: vrf: Add l3mdev rules on first device create")
Signed-off-by: David Ahern <dsa@cumulusnetworks.com>
---
 drivers/net/vrf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

David Miller April 17, 2017, 5:28 p.m. UTC | #1
From: David Ahern <dsa@cumulusnetworks.com>
Date: Thu, 13 Apr 2017 10:57:15 -0600

> Only need 1 l3mdev FIB rule. Fix setting NLM_F_EXCL in the nlmsghdr.
> 
> Fixes: 1aa6c4f6b8cd8 ("net: vrf: Add l3mdev rules on first device create")
> Signed-off-by: David Ahern <dsa@cumulusnetworks.com>

Applied and queued up for -stable, thanks.
diff mbox

Patch

diff --git a/drivers/net/vrf.c b/drivers/net/vrf.c
index 22379da63400..6a6e7f2fee29 100644
--- a/drivers/net/vrf.c
+++ b/drivers/net/vrf.c
@@ -1125,7 +1125,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));