Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 278509
b: refs/heads/master
c: f58ee4e
h: refs/heads/master
i:
  278507: f03ab77
v: v3
  • Loading branch information
stephen hemminger authored and David S. Miller committed Dec 9, 2011
1 parent 2147535 commit e8919e3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 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: f33f1fccbf67b3d9b310a4b09114b7c670320ad4
refs/heads/master: f58ee4e1a28b68ad94130a747d676cbc6644dbd1
11 changes: 7 additions & 4 deletions trunk/net/bridge/br_fdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,6 @@ static struct net_bridge_fdb_entry *fdb_create(struct hlist_head *head,
fdb->is_static = 0;
fdb->updated = fdb->used = jiffies;
hlist_add_head_rcu(&fdb->hlist, head);
fdb_notify(fdb, RTM_NEWNEIGH);
}
return fdb;
}
Expand Down Expand Up @@ -379,6 +378,7 @@ static int fdb_insert(struct net_bridge *br, struct net_bridge_port *source,
return -ENOMEM;

fdb->is_local = fdb->is_static = 1;
fdb_notify(fdb, RTM_NEWNEIGH);
return 0;
}

Expand Down Expand Up @@ -424,9 +424,11 @@ void br_fdb_update(struct net_bridge *br, struct net_bridge_port *source,
}
} else {
spin_lock(&br->hash_lock);
if (likely(!fdb_find(head, addr)))
fdb_create(head, source, addr);

if (likely(!fdb_find(head, addr))) {
fdb = fdb_create(head, source, addr);
if (fdb)
fdb_notify(fdb, RTM_NEWNEIGH);
}
/* else we lose race and someone else inserts
* it first, don't bother updating
*/
Expand Down Expand Up @@ -572,6 +574,7 @@ static int fdb_add_entry(struct net_bridge_port *source, const __u8 *addr,
fdb = fdb_create(head, source, addr);
if (!fdb)
return -ENOMEM;
fdb_notify(fdb, RTM_NEWNEIGH);
} else {
if (flags & NLM_F_EXCL)
return -EEXIST;
Expand Down

0 comments on commit e8919e3

Please sign in to comment.