OSDN Git Service

net: bridge: explicitly zero is_sticky in fdb_create
authorNikolay Aleksandrov <nikolay@cumulusnetworks.com>
Thu, 27 Sep 2018 12:05:10 +0000 (15:05 +0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 28 Sep 2018 17:43:11 +0000 (10:43 -0700)
We need to explicitly zero is_sticky when creating a new fdb, otherwise
we might get a stale value for a new entry.

Fixes: 435f2e7cc0b7 ("net: bridge: add support for sticky fdb entries")
Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/bridge/br_fdb.c

index a56ed7f..7433169 100644 (file)
@@ -504,6 +504,7 @@ static struct net_bridge_fdb_entry *fdb_create(struct net_bridge *br,
                fdb->added_by_user = 0;
                fdb->added_by_external_learn = 0;
                fdb->offloaded = 0;
+               fdb->is_sticky = 0;
                fdb->updated = fdb->used = jiffies;
                if (rhashtable_lookup_insert_fast(&br->fdb_hash_tbl,
                                                  &fdb->rhnode,