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, ...@@ -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)) { if (!memcmp(fdb->addr.addr, addr, ETH_ALEN)) {
/* attempt to update an entry for a local interface */ /* attempt to update an entry for a local interface */
if (unlikely(fdb->is_local)) { if (unlikely(fdb->is_local)) {
if (is_local) /* it is okay to have multiple ports with same
printk(KERN_INFO "%s: attempt to add" * address, just don't allow to be spoofed.
" interface with same source address.\n", */
source->dev->name); if (!is_local) {
else if (net_ratelimit()) if (net_ratelimit())
printk(KERN_WARNING "%s: received packet with " printk(KERN_WARNING "%s: received packet with "
" own address as source address\n", " own address as source address\n",
source->dev->name); source->dev->name);
ret = -EEXIST; ret = -EEXIST;
}
goto out; goto out;
} }
if (likely(!fdb->is_static || is_local)) { if (likely(!fdb->is_static || is_local)) {
/* move to end of age list */ /* move to end of age list */
list_del(&fdb->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