Commit 44fcd182 authored by Stephen Hemminger's avatar Stephen Hemminger Committed by David S. Miller

[BRIDGE]: Allow multiple interfaces with same address (necessary for VLAN's).

parent 8163ca20
......@@ -277,19 +277,19 @@ int br_fdb_insert(struct net_bridge *br, struct net_bridge_port *source,
if (!memcmp(fdb->addr.addr, addr, ETH_ALEN)) {
/* attempt to update an entry for a local interface */
if (unlikely(fdb->is_local)) {
if (is_local)
printk(KERN_INFO "%s: attempt to add"
" interface with same source address.\n",
source->dev->name);
else if (net_ratelimit())
printk(KERN_WARNING "%s: received packet with "
" own address as source address\n",
source->dev->name);
ret = -EEXIST;
/* it is okay to have multiple ports with same
* address, just don't allow to be spoofed.
*/
if (!is_local) {
if (net_ratelimit())
printk(KERN_WARNING "%s: received packet with "
" own address as source address\n",
source->dev->name);
ret = -EEXIST;
}
goto out;
}
if (likely(!fdb->is_static || is_local)) {
/* move to end of age list */
list_del(&fdb->age_list);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment