Status changed to 'Confirmed' because the bug affects multiple users.

** Changed in: network-manager (Ubuntu)
       Status: New => Confirmed

You received this bug notification because you are a member of Desktop
Packages, which is subscribed to network-manager in Ubuntu.

  NetworkManager: setting wifi.cloned-mac-address from pre-up.d fails
  silently for new connections

Status in network-manager package in Ubuntu:

Bug description:
  network-manager 1.2.6-0ubuntu0.16.04.2

  I'm using a script in /etc/NetworkManager/dispatcher.d/pre-up.d to
  assign a pseudorandom mac address using the cloned-mac-address setting
  (via this command):

  > nmcli connection modify <connection uuid> wifi.cloned-mac-address

  (Specifically, I'm using this script:

  This works a treat for existing connections - ifconfig shows that the MAC 
address has been assigned correctly (as denoted by the leading 02):

  $ ifconfig wlp6s0
  wlp6s0    Link encap:Ethernet  HWaddr 02:2a:8b:4e:ca:ef

  However if I delete that connection from Network Manager and add it
  again, the interface comes, leaking its real hardware mac address:

  $ ifconfig wlp6s0
  wlp6s0    Link encap:Ethernet  HWaddr b0:35:9f:XX:XX:XX

  Theory 1: Maybe pre-up.d hooks don't run for new connections? Nope - I
  can see from the logs that the script definitely runs when I connect
  to the wifi for the first time.

  Theory 2: Maybe the Network Manager connection doesn't exist yet, so
  the script can't see it via its initial `nmcli connection show`
  command? Nope - at the top of the log is the command `nmcli connection
  modify <uuid of the new connection> wifi.cloned-mac-address

  So, in summary, setting wifi.cloned-mac-address from a pre-up.d hook
  works great for *existing* connections but appears to fail silently
  for *new* connections.


To manage notifications about this bug go to:

Mailing list:
Post to     :
Unsubscribe :
More help   :

Reply via email to