core: MAC address spoofing/cloning (rh #447827) (bgo #553771)

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:
Jiří Klimeš
2010-06-22 14:21:25 +02:00
parent a8e0c2637b
commit 1b49f941a6
28 changed files with 705 additions and 128 deletions

View File

@@ -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