This commit implements MAC cloning feature in NetworkManager. To support that, 'PermHwAddress' property is added into *.Device.Wired and *.Device.Wireless interfaces. The permanent MAC address is obtained when creating the device, and is used for 'locking' connections to the device. If a cloned MAC is specified in connection to be activated, the MAC is set to the interface in stage1. While disconecting, the permanent MAC is set back to the interface.
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Copyright (C) 2004 - 2008 Red Hat, Inc.
|
||||
* Copyright (C) 2004 - 2010 Red Hat, Inc.
|
||||
* Copyright (C) 2005 - 2008 Novell, Inc.
|
||||
*/
|
||||
|
||||
@@ -25,6 +25,8 @@
|
||||
#include <netlink/route/rtnl.h>
|
||||
#include <netlink/route/route.h>
|
||||
|
||||
#include <net/ethernet.h>
|
||||
|
||||
#include <glib.h>
|
||||
#include "nm-device.h"
|
||||
#include "nm-ip4-config.h"
|
||||
@@ -80,5 +82,6 @@ gboolean nm_system_device_is_up (NMDevice *device);
|
||||
gboolean nm_system_device_is_up_with_iface (const char *iface);
|
||||
|
||||
gboolean nm_system_device_set_mtu (const char *iface, guint32 mtu);
|
||||
gboolean nm_system_device_set_mac (const char *iface, const struct ether_addr *mac);
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user