dev.c (65921376425fc9c8b7ce647e1f7989f7cdf5dd70) dev.c (d4e4fdf9e4a27c87edb79b1478955075be141f67)
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * NET3 Protocol independent device support routines.
4 *
5 * Derived from the non IP parts of dev.c 1.0.19
6 * Authors: Ross Biro
7 * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
8 * Mark Evans, <evansmp@uhura.aston.ac.uk>

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

9765 *
9766 * Note that dev->reg_state stays at NETREG_REGISTERED.
9767 * This is wanted because this way 8021q and macvlan know
9768 * the device is just moving and can keep their slaves up.
9769 */
9770 call_netdevice_notifiers(NETDEV_UNREGISTER, dev);
9771 rcu_barrier();
9772
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * NET3 Protocol independent device support routines.
4 *
5 * Derived from the non IP parts of dev.c 1.0.19
6 * Authors: Ross Biro
7 * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
8 * Mark Evans, <evansmp@uhura.aston.ac.uk>

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

9765 *
9766 * Note that dev->reg_state stays at NETREG_REGISTERED.
9767 * This is wanted because this way 8021q and macvlan know
9768 * the device is just moving and can keep their slaves up.
9769 */
9770 call_netdevice_notifiers(NETDEV_UNREGISTER, dev);
9771 rcu_barrier();
9772
9773 new_nsid = peernet2id_alloc(dev_net(dev), net);
9773 new_nsid = peernet2id_alloc(dev_net(dev), net, GFP_KERNEL);
9774 /* If there is an ifindex conflict assign a new one */
9775 if (__dev_get_by_index(net, dev->ifindex))
9776 new_ifindex = dev_new_index(net);
9777 else
9778 new_ifindex = dev->ifindex;
9779
9780 rtmsg_ifinfo_newnet(RTM_DELLINK, dev, ~0U, GFP_KERNEL, &new_nsid,
9781 new_ifindex);

--- 461 unchanged lines hidden ---
9774 /* If there is an ifindex conflict assign a new one */
9775 if (__dev_get_by_index(net, dev->ifindex))
9776 new_ifindex = dev_new_index(net);
9777 else
9778 new_ifindex = dev->ifindex;
9779
9780 rtmsg_ifinfo_newnet(RTM_DELLINK, dev, ~0U, GFP_KERNEL, &new_nsid,
9781 new_ifindex);

--- 461 unchanged lines hidden ---