macvlan.c (8e4e4c2f53ffcb0ef746dc3b87ce1a57c5c94c7d) | macvlan.c (23569b5652ee8e8e55a12f7835f59af6f3cefc30) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-or-later 2/* 3 * Copyright (c) 2007 Patrick McHardy <kaber@trash.net> 4 * 5 * The code this is based on carried the following copyright notice: 6 * --- 7 * (C) Copyright 2001-2006 8 * Alex Zeffertt, Cambridge Broadband Ltd, ajz@cambridgebroadband.com --- 1519 unchanged lines hidden (view full) --- 1528unregister_netdev: 1529 /* macvlan_uninit would free the macvlan port */ 1530 unregister_netdevice(dev); 1531 return err; 1532destroy_macvlan_port: 1533 /* the macvlan port may be freed by macvlan_uninit when fail to register. 1534 * so we destroy the macvlan port only when it's valid. 1535 */ | 1// SPDX-License-Identifier: GPL-2.0-or-later 2/* 3 * Copyright (c) 2007 Patrick McHardy <kaber@trash.net> 4 * 5 * The code this is based on carried the following copyright notice: 6 * --- 7 * (C) Copyright 2001-2006 8 * Alex Zeffertt, Cambridge Broadband Ltd, ajz@cambridgebroadband.com --- 1519 unchanged lines hidden (view full) --- 1528unregister_netdev: 1529 /* macvlan_uninit would free the macvlan port */ 1530 unregister_netdevice(dev); 1531 return err; 1532destroy_macvlan_port: 1533 /* the macvlan port may be freed by macvlan_uninit when fail to register. 1534 * so we destroy the macvlan port only when it's valid. 1535 */ |
1536 if (create && macvlan_port_get_rtnl(lowerdev)) | 1536 if (create && macvlan_port_get_rtnl(lowerdev)) { 1537 macvlan_flush_sources(port, vlan); |
1537 macvlan_port_destroy(port->dev); | 1538 macvlan_port_destroy(port->dev); |
1539 } |
|
1538 return err; 1539} 1540EXPORT_SYMBOL_GPL(macvlan_common_newlink); 1541 1542static int macvlan_newlink(struct net *src_net, struct net_device *dev, 1543 struct nlattr *tb[], struct nlattr *data[], 1544 struct netlink_ext_ack *extack) 1545{ --- 298 unchanged lines hidden --- | 1540 return err; 1541} 1542EXPORT_SYMBOL_GPL(macvlan_common_newlink); 1543 1544static int macvlan_newlink(struct net *src_net, struct net_device *dev, 1545 struct nlattr *tb[], struct nlattr *data[], 1546 struct netlink_ext_ack *extack) 1547{ --- 298 unchanged lines hidden --- |