Bug 1161231 - NetworkManager flips wlan mac despite any attempts to not change it
NetworkManager flips wlan mac despite any attempts to not change it
Status: NEW
Classification: openSUSE
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: GNOME
Current
Other Other
: P5 - None : Normal (vote)
: ---
Assigned To: E-mail List
E-mail List
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2020-01-17 18:21 UTC by Hans-Peter Jansen
Modified: 2020-01-19 01:55 UTC (History)
1 user (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hans-Peter Jansen 2020-01-17 18:21:31 UTC
Hi,

facing a strange NM behavior here. 

Result of a single boot:

2020-01-17T19:02:02.750641+01:00 rex arpwatch: flip flop 172.16.23.92 d0:df:9a:a2:4c:c0 (6c:62:6d:2f:96:4b)
2020-01-17T19:02:25.278584+01:00 rex arpwatch: flip flop 172.16.23.92 6c:62:6d:2f:96:4b (d0:df:9a:a2:4c:c0)
2020-01-17T19:03:23.646595+01:00 rex arpwatch: flip flop 172.16.23.92 d0:df:9a:a2:4c:c0 (6c:62:6d:2f:96:4b)
2020-01-17T19:03:33.886545+01:00 rex arpwatch: flip flop 172.16.23.92 6c:62:6d:2f:96:4b (d0:df:9a:a2:4c:c0)
2020-01-17T19:05:31.650608+01:00 rex arpwatch: flip flop 172.16.23.92 d0:df:9a:a2:4c:c0 (6c:62:6d:2f:96:4b)
2020-01-17T19:05:41.890692+01:00 rex arpwatch: flip flop 172.16.23.92 6c:62:6d:2f:96:4b (d0:df:9a:a2:4c:c0)

The misbehaving system is an old notebook (MSI MS-16GN, AMD E-240, 8 GB):
https://www.msi.com/Laptop/CR650GX670CR670/Specification

$ ip addr
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 6c:62:6d:2f:96:4b brd ff:ff:ff:ff:ff:ff
    inet 172.16.23.91/24 brd 172.16.23.255 scope global dynamic noprefixroute eth0
       valid_lft 85477sec preferred_lft 85477sec
    inet6 fe80::ae85:c0da:c684:810/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether d0:df:9a:a2:4c:c0 brd ff:ff:ff:ff:ff:ff
    inet 172.16.23.92/24 brd 172.16.23.255 scope global dynamic noprefixroute wlan0
       valid_lft 86000sec preferred_lft 86000sec
    inet6 fe80::8bce:2fe9:336:da0c/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever

As you can see, the flip switches between the eth0 and wlan0 mac, but 

$ cat /etc/NetworkManager/NetworkManager.conf
[main]
plugins=keyfile
dhcp=dhclient

[device]
wifi.scan-rand-mac-address=no

[connection]
wifi.cloned-mac-address=stable
ethernet.cloned-mac-address=stable
connection.stable-id=${CONNECTION}/${BOOT

[connectivity]
uri=http://conncheck.opensuse.org

Randomization is off (and it doesn't randomize, rather it flips the mac back and forth (misusing the eth0 mac for that process), despite explicitly forcing the mac permanent for both existing connections:

$ nmcli c
NAME                         UUID                                  TYPE      DEVICE 
Kabelgebundene Verbindung 1  13e8caa1-f5f1-3114-95b1-d8b2dd73725d  ethernet  eth0   
SSID                         4e60f272-a913-4d6c-9bf3-33f5fe53b2f6  wifi      wlan0  

$ nmcli c show 13e8caa1-f5f1-3114-95b1-d8b2dd73725d | grep cloned
802-3-ethernet.cloned-mac-address:      permanent

$ nmcli c show 4e60f272-a913-4d6c-9bf3-33f5fe53b2f6 | grep cloned
802-11-wireless.cloned-mac-address:     permanent

Initially, the system was switched from wicked to NM, and was setup in KDE.

the dhcp=dhclient was another attempt to resolve this issue.

Puzzling, isn't it?

Tumbleweed 20200115
Comment 1 Hans-Peter Jansen 2020-01-17 18:54:28 UTC
I forgot a few details:

the flipping starts after logging into the DE, because NM is configured to enable eth0 for all users (on boot), and wlan0 for the (only) user of the system (my son). 

The flips happen all the time (dormand desktop), I just run a VNC session for login, and a SSH session for control.

Here're the mac settings of wlan0:

$ nmcli c show 4e60f272-a913-4d6c-9bf3-33f5fe53b2f6 | grep mac
802-11-wireless.mac-address:            D0:DF:9A:A2:4C:C0
802-11-wireless.cloned-mac-address:     permanent
802-11-wireless.generate-mac-address-mask:--
802-11-wireless.mac-address-blacklist:  --
802-11-wireless.mac-address-randomization:never

and these piled up after the last reboot:

2020-01-17T19:30:14.398594+01:00 rex arpwatch: flip flop 172.16.23.92 d0:df:9a:a2:4c:c0 (6c:62:6d:2f:96:4b)
2020-01-17T19:30:23.614650+01:00 rex arpwatch: flip flop 172.16.23.92 6c:62:6d:2f:96:4b (d0:df:9a:a2:4c:c0)
2020-01-17T19:30:49.214757+01:00 rex arpwatch: flip flop 172.16.23.92 d0:df:9a:a2:4c:c0 (6c:62:6d:2f:96:4b)
2020-01-17T19:31:01.502672+01:00 rex arpwatch: flip flop 172.16.23.92 6c:62:6d:2f:96:4b (d0:df:9a:a2:4c:c0)
2020-01-17T19:31:29.150651+01:00 rex arpwatch: flip flop 172.16.23.92 d0:df:9a:a2:4c:c0 (6c:62:6d:2f:96:4b)
2020-01-17T19:31:47.586630+01:00 rex arpwatch: flip flop 172.16.23.92 6c:62:6d:2f:96:4b (d0:df:9a:a2:4c:c0)
2020-01-17T19:32:26.494747+01:00 rex arpwatch: flip flop 172.16.23.92 d0:df:9a:a2:4c:c0 (6c:62:6d:2f:96:4b)
2020-01-17T19:32:37.758530+01:00 rex arpwatch: flip flop 172.16.23.92 6c:62:6d:2f:96:4b (d0:df:9a:a2:4c:c0)
2020-01-17T19:34:34.498555+01:00 rex arpwatch: flip flop 172.16.23.92 d0:df:9a:a2:4c:c0 (6c:62:6d:2f:96:4b)
2020-01-17T19:34:52.926726+01:00 rex arpwatch: flip flop 172.16.23.92 6c:62:6d:2f:96:4b (d0:df:9a:a2:4c:c0)
2020-01-17T19:38:50.494561+01:00 rex arpwatch: flip flop 172.16.23.92 d0:df:9a:a2:4c:c0 (6c:62:6d:2f:96:4b)
2020-01-17T19:39:01.758603+01:00 rex arpwatch: flip flop 172.16.23.92 6c:62:6d:2f:96:4b (d0:df:9a:a2:4c:c0)
2020-01-17T19:43:45.410615+01:00 rex arpwatch: flip flop 172.16.23.92 d0:df:9a:a2:4c:c0 (6c:62:6d:2f:96:4b)
2020-01-17T19:43:56.674661+01:00 rex arpwatch: flip flop 172.16.23.92 6c:62:6d:2f:96:4b (d0:df:9a:a2:4c:c0)

Needless to mention, that a few hundred of those per day is slightly disturbing (arpwatch sends a mail for any of these events...)