diff options
Diffstat (limited to 'net/bridge/br_if.c')
-rw-r--r-- | net/bridge/br_if.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/net/bridge/br_if.c b/net/bridge/br_if.c index f38cc5317b88..a072ea5ca6f5 100644 --- a/net/bridge/br_if.c +++ b/net/bridge/br_if.c | |||
@@ -5,8 +5,6 @@ | |||
5 | * Authors: | 5 | * Authors: |
6 | * Lennert Buytenhek <buytenh@gnu.org> | 6 | * Lennert Buytenhek <buytenh@gnu.org> |
7 | * | 7 | * |
8 | * $Id: br_if.c,v 1.7 2001/12/24 00:59:55 davem Exp $ | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or | 8 | * This program is free software; you can redistribute it and/or |
11 | * modify it under the terms of the GNU General Public License | 9 | * modify it under the terms of the GNU General Public License |
12 | * as published by the Free Software Foundation; either version | 10 | * as published by the Free Software Foundation; either version |
@@ -375,6 +373,10 @@ int br_add_if(struct net_bridge *br, struct net_device *dev) | |||
375 | if (IS_ERR(p)) | 373 | if (IS_ERR(p)) |
376 | return PTR_ERR(p); | 374 | return PTR_ERR(p); |
377 | 375 | ||
376 | err = dev_set_promiscuity(dev, 1); | ||
377 | if (err) | ||
378 | goto put_back; | ||
379 | |||
378 | err = kobject_init_and_add(&p->kobj, &brport_ktype, &(dev->dev.kobj), | 380 | err = kobject_init_and_add(&p->kobj, &brport_ktype, &(dev->dev.kobj), |
379 | SYSFS_BRIDGE_PORT_ATTR); | 381 | SYSFS_BRIDGE_PORT_ATTR); |
380 | if (err) | 382 | if (err) |
@@ -389,7 +391,7 @@ int br_add_if(struct net_bridge *br, struct net_device *dev) | |||
389 | goto err2; | 391 | goto err2; |
390 | 392 | ||
391 | rcu_assign_pointer(dev->br_port, p); | 393 | rcu_assign_pointer(dev->br_port, p); |
392 | dev_set_promiscuity(dev, 1); | 394 | dev_disable_lro(dev); |
393 | 395 | ||
394 | list_add_rcu(&p->list, &br->port_list); | 396 | list_add_rcu(&p->list, &br->port_list); |
395 | 397 | ||
@@ -413,12 +415,12 @@ err2: | |||
413 | br_fdb_delete_by_port(br, p, 1); | 415 | br_fdb_delete_by_port(br, p, 1); |
414 | err1: | 416 | err1: |
415 | kobject_del(&p->kobj); | 417 | kobject_del(&p->kobj); |
416 | goto put_back; | ||
417 | err0: | 418 | err0: |
418 | kobject_put(&p->kobj); | 419 | kobject_put(&p->kobj); |
419 | 420 | dev_set_promiscuity(dev, -1); | |
420 | put_back: | 421 | put_back: |
421 | dev_put(dev); | 422 | dev_put(dev); |
423 | kfree(p); | ||
422 | return err; | 424 | return err; |
423 | } | 425 | } |
424 | 426 | ||