@@ -347,7 +347,6 @@ static struct net_bridge_fdb_entry *fdb_
fdb->is_static = 0;
fdb->updated = fdb->used = jiffies;
hlist_add_head_rcu(&fdb->hlist, head);
- fdb_notify(fdb, RTM_NEWNEIGH);
}
return fdb;
}
@@ -379,6 +378,7 @@ static int fdb_insert(struct net_bridge
return -ENOMEM;
fdb->is_local = fdb->is_static = 1;
+ fdb_notify(fdb, RTM_NEWNEIGH);
return 0;
}
@@ -424,8 +424,11 @@ void br_fdb_update(struct net_bridge *br
}
} else {
spin_lock(&br->hash_lock);
- if (likely(!fdb_find(head, addr)))
- fdb_create(head, source, addr);
+ if (!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
@@ -576,6 +579,8 @@ static int fdb_add_entry(struct net_brid
fdb->is_local = fdb->is_static = 1;
else if (state & NUD_NOARP)
fdb->is_static = 1;
+
+ fdb_notify(fdb, RTM_NEWNEIGH);
return 0;
}
The functionality for notification was added with 3.0. kernel but bridge would always send new neighbour message with state == 0. The problem is that the notify needs to be done after the flags on ther forwarding engry are set. Signed-off-by: Stephen Hemminger <shemminger@vyatta.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