Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 369784
b: refs/heads/master
c: b0a397f
h: refs/heads/master
v: v3
  • Loading branch information
roopa authored and David S. Miller committed Apr 29, 2013
1 parent d06ac30 commit c4a643c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c39904a0ac22cf05f5f44226457f6da0fe65457e
refs/heads/master: b0a397fb352e65e3b6501dca9662617a18862ef1
16 changes: 14 additions & 2 deletions trunk/net/bridge/br_fdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -615,6 +615,7 @@ static int fdb_add_entry(struct net_bridge_port *source, const __u8 *addr,
struct net_bridge *br = source->br;
struct hlist_head *head = &br->hash[br_mac_hash(addr, vid)];
struct net_bridge_fdb_entry *fdb;
bool modified = false;

fdb = fdb_find(head, addr, vid);
if (fdb == NULL) {
Expand All @@ -624,10 +625,16 @@ static int fdb_add_entry(struct net_bridge_port *source, const __u8 *addr,
fdb = fdb_create(head, source, addr, vid);
if (!fdb)
return -ENOMEM;
fdb_notify(br, fdb, RTM_NEWNEIGH);

modified = true;
} else {
if (flags & NLM_F_EXCL)
return -EEXIST;

if (fdb->dst != source) {
fdb->dst = source;
modified = true;
}
}

if (fdb_to_nud(fdb) != state) {
Expand All @@ -639,7 +646,12 @@ static int fdb_add_entry(struct net_bridge_port *source, const __u8 *addr,
} else
fdb->is_local = fdb->is_static = 0;

fdb->updated = fdb->used = jiffies;
modified = true;
}

fdb->used = jiffies;
if (modified) {
fdb->updated = jiffies;
fdb_notify(br, fdb, RTM_NEWNEIGH);
}

Expand Down

0 comments on commit c4a643c

Please sign in to comment.