NetworkManager/libnm
Thomas Haller 96cabbcbb8 all: make MAC address randomization algorithm configurable
For the per-connection settings "ethernet.cloned-mac-address"
and "wifi.cloned-mac-address", and for the per-device setting
"wifi.scan-rand-mac-address", we may generate MAC addresses using
either the "random" or "stable" algorithm.

Add new properties "generate-mac-address-mask" that allow to configure
which bits of the MAC address will be scrambled.

By default, the "random" and "stable" algorithms scamble all bits
of the MAC address, including the OUI part and generate a locally-
administered, unicast address.

By specifying a MAC address mask, we can now configure to perserve
parts of the current MAC address of the device. For example, setting
"FF:FF:FF:00:00:00" will preserve the first 3 octects of the current
MAC address.

One can also explicitly specify a MAC address to use instead of the
current MAC address. For example, "FF:FF:FF:00:00:00 68:F7:28:00:00:00"
sets the OUI part of the MAC address to "68:F7:28" while scrambling
the last 3 octects.
Similarly, "02:00:00:00:00:00 00:00:00:00:00:00" will scamble
all bits of the MAC address, except clearing the second-least
significant bit. Thus, creating a burned-in address, globally
administered.

One can also supply a list of MAC addresses like
"FF:FF:FF:00:00:00 68:F7:28:00:00:00 00:0C:29:00:00:00 ..." in which
case a MAC address is choosen randomly.

To fully scamble the MAC address one can configure
"02:00:00:00:00:00 00:00:00:00:00:00 02:00:00:00:00:00".
which also randomly creates either a locally or globally administered
address.

With this, the following macchanger options can be implemented:

  `macchanger --random`
   This is the default if no mask is configured.
   -> ""
   while is the same as:
   -> "00:00:00:00:00:00"
   -> "02:00:00:00:00:00 02:00:00:00:00:00"

  `macchanger --random --bia`
   -> "02:00:00:00:00:00 00:00:00:00:00:00"

  `macchanger --ending`
   This option cannot be fully implemented, because macchanger
   uses the current MAC address but also implies --bia.
   -> "FF:FF:FF:00:00:00"
      This would yields the same result only if the current MAC address
      is already a burned-in address too. Otherwise, it has not the same
      effect as --ending.
   -> "FF:FF:FF:00:00:00 <MAC_ADDR>"
      Alternatively, instead of using the current MAC address,
      spell the OUI part out. But again, that is not really the
      same as macchanger does because you explictly have to name
      the OUI part to use.

  `machanger --another`
  `machanger --another_any`
  -> "FF:FF:FF:00:00:00 <MAC_ADDR> <MAC_ADDR> ..."
     "$(printf "FF:FF:FF:00:00:00 %s\n" "$(sed -n 's/^\([0-9a-fA-F][0-9a-fA-F]\) \([0-9a-fA-F][0-9a-fA-F]\) \([0-9a-fA-F][0-9a-fA-F]\) .*/\1:\2:\3:00:00:00/p' /usr/share/macchanger/wireless.list | xargs)")"
2016-06-30 08:32:50 +02:00
..
tests shared/tests: build "nm-utils/nm-vpn-plugin-utils.c" 2016-06-16 10:45:54 +02:00
generate-plugin-docs.pl trivial: fix a comment typo in generate-plugin-docs.pl 2014-11-19 17:54:03 +01:00
generate-setting-docs.py python: use gi.require_version() in generate-setting-docs.py and examples 2015-11-11 10:56:05 +01:00
libnm.pc.in libnm,pkg-config: provide a variable with VPN service directory 2015-08-19 15:13:11 +02:00
libnm.ver all: make MAC address randomization algorithm configurable 2016-06-30 08:32:50 +02:00
Makefile.am build: add options to compile with address/undefined sanitizers 2016-06-03 22:19:38 +02:00
NetworkManager.h libnm: include "nm-vpn-service-plugin.h" in "NetworkManager.h" 2016-01-27 17:20:09 +01:00
nm-access-point.c all: cleanup includes and let "nm-default.h" include "config.h" 2016-02-19 17:53:25 +01:00
nm-access-point.h docs: libnm: add doc comment to types 2016-05-05 17:01:57 +02:00
nm-active-connection.c all: cleanup includes and let "nm-default.h" include "config.h" 2016-02-19 17:53:25 +01:00
nm-active-connection.h docs: libnm: add doc comment to types 2016-05-05 17:01:57 +02:00
nm-client.c libnm: add code comments to hint that NMConnection might not validate 2016-03-29 11:56:27 +02:00
nm-client.h manager: add Reload() D-Bus command 2016-06-01 19:06:34 +02:00
nm-dbus-helpers.c all: cleanup includes and let "nm-default.h" include "config.h" 2016-02-19 17:53:25 +01:00
nm-dbus-helpers.h all: make use of new header file "nm-default.h" 2015-08-05 15:32:40 +02:00
nm-device-adsl.c all: cleanup includes and let "nm-default.h" include "config.h" 2016-02-19 17:53:25 +01:00
nm-device-adsl.h docs: libnm: add doc comment to types 2016-05-05 17:01:57 +02:00
nm-device-bond.c all: cleanup includes and let "nm-default.h" include "config.h" 2016-02-19 17:53:25 +01:00
nm-device-bond.h docs: libnm: add doc comment to types 2016-05-05 17:01:57 +02:00
nm-device-bridge.c all: cleanup includes and let "nm-default.h" include "config.h" 2016-02-19 17:53:25 +01:00
nm-device-bridge.h docs: libnm: add doc comment to types 2016-05-05 17:01:57 +02:00
nm-device-bt.c all: cleanup includes and let "nm-default.h" include "config.h" 2016-02-19 17:53:25 +01:00
nm-device-bt.h docs: libnm: add doc comment to types 2016-05-05 17:01:57 +02:00
nm-device-ethernet.c all: cleanup includes and let "nm-default.h" include "config.h" 2016-02-19 17:53:25 +01:00
nm-device-ethernet.h docs: libnm: add doc comment to types 2016-05-05 17:01:57 +02:00
nm-device-generic.c all: cleanup includes and let "nm-default.h" include "config.h" 2016-02-19 17:53:25 +01:00
nm-device-generic.h docs: libnm: add doc comment to types 2016-05-05 17:01:57 +02:00
nm-device-infiniband.c all: cleanup includes and let "nm-default.h" include "config.h" 2016-02-19 17:53:25 +01:00
nm-device-infiniband.h docs: libnm: add doc comment to types 2016-05-05 17:01:57 +02:00
nm-device-ip-tunnel.c all: cleanup includes and let "nm-default.h" include "config.h" 2016-02-19 17:53:25 +01:00
nm-device-ip-tunnel.h docs: libnm: add doc comment to types 2016-05-05 17:01:57 +02:00
nm-device-macvlan.c all: cleanup includes and let "nm-default.h" include "config.h" 2016-02-19 17:53:25 +01:00
nm-device-macvlan.h docs: libnm: add doc comment to types 2016-05-05 17:01:57 +02:00
nm-device-modem.c all: cleanup includes and let "nm-default.h" include "config.h" 2016-02-19 17:53:25 +01:00
nm-device-modem.h docs: libnm: add doc comment to types 2016-05-05 17:01:57 +02:00
nm-device-olpc-mesh.c all: cleanup includes and let "nm-default.h" include "config.h" 2016-02-19 17:53:25 +01:00
nm-device-olpc-mesh.h docs: libnm: add doc comment to types 2016-05-05 17:01:57 +02:00
nm-device-private.h all: fix up multiple-include-guard defines 2014-08-16 10:17:14 -04:00
nm-device-team.c team: expose current device configuration through D-Bus and nmcli 2016-05-26 09:16:46 +02:00
nm-device-team.h team: expose current device configuration through D-Bus and nmcli 2016-05-26 09:16:46 +02:00
nm-device-tun.c all: cleanup includes and let "nm-default.h" include "config.h" 2016-02-19 17:53:25 +01:00
nm-device-tun.h docs: libnm: add doc comment to types 2016-05-05 17:01:57 +02:00
nm-device-vlan.c all: cleanup includes and let "nm-default.h" include "config.h" 2016-02-19 17:53:25 +01:00
nm-device-vlan.h docs: libnm: add doc comment to types 2016-05-05 17:01:57 +02:00
nm-device-vxlan.c all: cleanup includes and let "nm-default.h" include "config.h" 2016-02-19 17:53:25 +01:00
nm-device-vxlan.h docs: libnm: add doc comment to types 2016-05-05 17:01:57 +02:00
nm-device-wifi.c all: cleanup includes and let "nm-default.h" include "config.h" 2016-02-19 17:53:25 +01:00
nm-device-wifi.h docs: libnm: add doc comment to types 2016-05-05 17:01:57 +02:00
nm-device-wimax.c all: cleanup includes and let "nm-default.h" include "config.h" 2016-02-19 17:53:25 +01:00
nm-device-wimax.h docs: libnm: add doc comment to types 2016-05-05 17:01:57 +02:00
nm-device.c libnm/libnm-glib: use Bluetooth device name as description (bgo #592819) 2016-06-21 10:35:53 -05:00
nm-device.h docs: libnm: add doc comment to types 2016-05-05 17:01:57 +02:00
nm-dhcp-config.c all: cleanup includes and let "nm-default.h" include "config.h" 2016-02-19 17:53:25 +01:00
nm-dhcp-config.h docs: libnm: add doc comment to types 2016-05-05 17:01:57 +02:00
nm-dhcp4-config.c all: cleanup includes and let "nm-default.h" include "config.h" 2016-02-19 17:53:25 +01:00
nm-dhcp4-config.h docs: libnm: add doc comment to types 2016-05-05 17:01:57 +02:00
nm-dhcp6-config.c all: cleanup includes and let "nm-default.h" include "config.h" 2016-02-19 17:53:25 +01:00
nm-dhcp6-config.h docs: libnm: add doc comment to types 2016-05-05 17:01:57 +02:00
nm-ip-config.c all: cleanup includes and let "nm-default.h" include "config.h" 2016-02-19 17:53:25 +01:00
nm-ip-config.h docs: libnm: add doc comment to types 2016-05-05 17:01:57 +02:00
nm-ip4-config.c all: cleanup includes and let "nm-default.h" include "config.h" 2016-02-19 17:53:25 +01:00
nm-ip4-config.h docs: libnm: add doc comment to types 2016-05-05 17:01:57 +02:00
nm-ip6-config.c all: cleanup includes and let "nm-default.h" include "config.h" 2016-02-19 17:53:25 +01:00
nm-ip6-config.h docs: libnm: add doc comment to types 2016-05-05 17:01:57 +02:00
nm-manager.c all: move NM_AUTH_PERMISSION_* defines to "nm-common-macros.h" header 2016-06-01 19:06:35 +02:00
nm-manager.h docs: libnm: add doc comment to types 2016-05-05 17:01:57 +02:00
nm-object-cache.c all: cleanup includes and let "nm-default.h" include "config.h" 2016-02-19 17:53:25 +01:00
nm-object-cache.h all: make use of new header file "nm-default.h" 2015-08-05 15:32:40 +02:00
nm-object-private.h all: make use of new header file "nm-default.h" 2015-08-05 15:32:40 +02:00
nm-object.c nm-object: delay object property completion until the objects are initialized 2016-03-14 16:32:44 +01:00
nm-object.h docs: libnm: add doc comment to types 2016-05-05 17:01:57 +02:00
nm-remote-connection-private.h libnm: add libnm/libnm-core (part 1) 2014-08-01 14:34:04 -04:00
nm-remote-connection.c libnm: be more accepting for invalid connections from NetworkManager 2016-03-26 12:10:54 +01:00
nm-remote-connection.h docs: libnm: add doc comment to types 2016-05-05 17:01:57 +02:00
nm-remote-settings.c all: cleanup includes and let "nm-default.h" include "config.h" 2016-02-19 17:53:25 +01:00
nm-remote-settings.h docs: libnm: add doc comment to types 2016-05-05 17:01:57 +02:00
nm-secret-agent-old.c libnm: don't check if the agent is still registered when unregistering 2016-03-29 15:08:19 +02:00
nm-secret-agent-old.h docs: libnm: add doc comment to types 2016-05-05 17:01:57 +02:00
nm-types.h libnm: add NMDeviceVxlan 2015-12-09 16:36:46 +01:00
nm-vpn-connection.c all: cleanup includes and let "nm-default.h" include "config.h" 2016-02-19 17:53:25 +01:00
nm-vpn-connection.h docs: libnm: add doc comment to types 2016-05-05 17:01:57 +02:00
nm-vpn-editor.c all: cleanup includes and let "nm-default.h" include "config.h" 2016-02-19 17:53:25 +01:00
nm-vpn-editor.h libnm: use <> to include in public header 2016-04-13 19:20:52 +02:00
nm-vpn-plugin-old.c libnm: accept invalid connections in NMVpnServicePlugin 2016-03-26 12:10:54 +01:00
nm-vpn-plugin-old.h docs: libnm: add doc comment to types 2016-05-05 17:01:57 +02:00
nm-vpn-service-plugin.c shared: move shared files to subdirectory "shared/nm-utils/" 2016-06-16 10:45:53 +02:00
nm-vpn-service-plugin.h docs: libnm: add doc comment to types 2016-05-05 17:01:57 +02:00
nm-wimax-nsp.c all: cleanup includes and let "nm-default.h" include "config.h" 2016-02-19 17:53:25 +01:00
nm-wimax-nsp.h docs: libnm: add doc comment to types 2016-05-05 17:01:57 +02:00