Patchwork [net-next] rtnetlink: Fix inverted check in ndo_dflt_fdb_del()

login
register
mail settings
Submitter Sridhar Samudrala
Date Aug. 8, 2013, 10:19 p.m.
Message ID <1376000389.22896.34.camel@sridhar.usor.ibm.com>
Download mbox | patch
Permalink /patch/265854/
State Accepted
Delegated to: David Miller
Headers show

Comments

Sridhar Samudrala - Aug. 8, 2013, 10:19 p.m.
Fix inverted check when deleting an fdb entry.

Signed-off-by: Sridhar Samudrala <sri@us.ibm.com>
---


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller - Aug. 10, 2013, 8:24 a.m.
From: Sridhar Samudrala <sri@us.ibm.com>
Date: Thu, 08 Aug 2013 15:19:48 -0700

> Fix inverted check when deleting an fdb entry.
> 
> Signed-off-by: Sridhar Samudrala <sri@us.ibm.com>

This fixes a bug that has been around for a release or two, so I've
applied it to 'net'.

Thanks.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index 0b2972c..618dbe4 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -2179,7 +2179,7 @@  int ndo_dflt_fdb_del(struct ndmsg *ndm,
 	/* If aging addresses are supported device will need to
 	 * implement its own handler for this.
 	 */
-	if (ndm->ndm_state & NUD_PERMANENT) {
+	if (!(ndm->ndm_state & NUD_PERMANENT)) {
 		pr_info("%s: FDB only supports static addresses\n", dev->name);
 		return -EINVAL;
 	}