[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1424416195-19098-4-git-send-email-sfeldma@gmail.com>
Date: Thu, 19 Feb 2015 23:09:53 -0800
From: sfeldma@...il.com
To: netdev@...r.kernel.org, jiri@...nulli.us,
roopa@...ulusnetworks.com, linux@...ck-us.net,
f.fainelli@...il.com, andrew@...n.ch, gospo@...ulusnetworks.com,
vbandaru@...adcom.com, siva.mannem.lnx@...il.com
Subject: [PATCH net-next RFC 3/5] bridge: call external learn add if adding FDB entry with NTF_EXT_LEARNED set
From: Scott Feldman <sfeldma@...il.com>
Only call into bridge driver to add externally learned FDB entry if driver/
device indicates entry with NTF_EXT_LEARNED.
Signed-off-by: Scott Feldman <sfeldma@...il.com>
---
net/bridge/br.c | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/net/bridge/br.c b/net/bridge/br.c
index fb57ab6..3dc5463 100644
--- a/net/bridge/br.c
+++ b/net/bridge/br.c
@@ -140,17 +140,19 @@ static int br_netdev_switch_event(struct notifier_block *unused,
switch (event) {
case NETDEV_SWITCH_FDB_ADD:
fdb_info = ptr;
- err = br_fdb_external_learn_add(br, p, fdb_info->addr,
- fdb_info->vid);
- if (err)
- err = notifier_from_errno(err);
+ if (fdb_info->ntf_flags & NTF_EXT_LEARNED) {
+ err = br_fdb_external_learn_add(br, p, fdb_info);
+ if (err)
+ err = notifier_from_errno(err);
+ }
break;
case NETDEV_SWITCH_FDB_DEL:
fdb_info = ptr;
- err = br_fdb_external_learn_del(br, p, fdb_info->addr,
- fdb_info->vid);
- if (err)
- err = notifier_from_errno(err);
+ if (fdb_info->ntf_flags & NTF_EXT_LEARNED) {
+ err = br_fdb_external_learn_del(br, p, fdb_info);
+ if (err)
+ err = notifier_from_errno(err);
+ }
break;
}
--
1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists