br_if.c (a3b072cd180c12e8fe0ece9487b9065808327640) br_if.c (a4b816d8ba1c1917842dc3de97cbf8ef116e043e)
1/*
2 * Userspace interface
3 * Linux ethernet bridge
4 *
5 * Authors:
6 * Lennert Buytenhek <buytenh@gnu.org>
7 *
8 * This program is free software; you can redistribute it and/or

--- 375 unchanged lines hidden (view full) ---

384
385 list_add_rcu(&p->list, &br->port_list);
386
387 netdev_update_features(br->dev);
388
389 if (br->dev->needed_headroom < dev->needed_headroom)
390 br->dev->needed_headroom = dev->needed_headroom;
391
1/*
2 * Userspace interface
3 * Linux ethernet bridge
4 *
5 * Authors:
6 * Lennert Buytenhek <buytenh@gnu.org>
7 *
8 * This program is free software; you can redistribute it and/or

--- 375 unchanged lines hidden (view full) ---

384
385 list_add_rcu(&p->list, &br->port_list);
386
387 netdev_update_features(br->dev);
388
389 if (br->dev->needed_headroom < dev->needed_headroom)
390 br->dev->needed_headroom = dev->needed_headroom;
391
392 if (br_fdb_insert(br, p, dev->dev_addr, 0))
393 netdev_err(dev, "failed insert local address bridge forwarding table\n");
394
392 spin_lock_bh(&br->lock);
393 changed_addr = br_stp_recalculate_bridge_id(br);
394
395 if (netif_running(dev) && netif_oper_up(dev) &&
396 (br->dev->flags & IFF_UP))
397 br_stp_enable_port(p);
398 spin_unlock_bh(&br->lock);
399
400 br_ifinfo_notify(RTM_NEWLINK, p);
401
402 if (changed_addr)
403 call_netdevice_notifiers(NETDEV_CHANGEADDR, br->dev);
404
405 dev_set_mtu(br->dev, br_min_mtu(br));
406
395 spin_lock_bh(&br->lock);
396 changed_addr = br_stp_recalculate_bridge_id(br);
397
398 if (netif_running(dev) && netif_oper_up(dev) &&
399 (br->dev->flags & IFF_UP))
400 br_stp_enable_port(p);
401 spin_unlock_bh(&br->lock);
402
403 br_ifinfo_notify(RTM_NEWLINK, p);
404
405 if (changed_addr)
406 call_netdevice_notifiers(NETDEV_CHANGEADDR, br->dev);
407
408 dev_set_mtu(br->dev, br_min_mtu(br));
409
407 if (br_fdb_insert(br, p, dev->dev_addr, 0))
408 netdev_err(dev, "failed insert local address bridge forwarding table\n");
409
410 kobject_uevent(&p->kobj, KOBJ_ADD);
411
412 return 0;
413
414err5:
415 netdev_upper_dev_unlink(dev, br->dev);
416err4:
417 br_netpoll_disable(p);

--- 40 unchanged lines hidden ---
410 kobject_uevent(&p->kobj, KOBJ_ADD);
411
412 return 0;
413
414err5:
415 netdev_upper_dev_unlink(dev, br->dev);
416err4:
417 br_netpoll_disable(p);

--- 40 unchanged lines hidden ---