systemd.link MACAddress=<whatever> matches OpenVPN tun device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Name            : systemd (commit c38499d476026d999558a7eee9c95ca2fa41e115)
Version         : 239.2-1
I have a systemd.link file that gives my usb modem a more recognizable name. I saw some renaming errors in the journal and noticed that systemd also tried to rename my VPN device. This shouldn't happen and I investigated. Here's the result:

It appears that the `50-usbmodem.link` file is being applied to the `tunvpn` device, even though the file has a MACAddress filter to match only the usbmodem.


I have the following file:

/etc/systemd/network/50-usbmodem.link

[Match]
MACAddress=aa:bb:cc:dd:ee:ff

[Link]
Name=usbmodem


And by running the following command, it can be seen that the problem really occurs.

$ udevadm test-builtin net_setup_link /sys/class/net/tunvpn/

calling: test-builtin
Load module index
Parsed configuration file /etc/systemd/network/50-usbmodem.link
Created link configuration context.
ID_NET_DRIVER=tun
Config file /etc/systemd/network/50-usbmodem.link applies to device tunvpn
link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
ID_NET_LINK_FILE=/etc/systemd/network/50-usbmodem.link
ID_NET_NAME=usbmodem
Unload module index
Unloaded link configuration context.

The tun device has no ethernet address, as it's a L3 interface, so the MACAddress really really shouldn't match.
$ ip link show tunvpn
xx: tunvpn: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UNKNOWN mode DEFAULT group default qlen 100
    link/none


I fixed this temporarily by adding the following line to the [Match] section:

Driver=huawei_cdc_ncm

I'm not entirely sure, but this appears to be a bug.

Maybe relevant section: https://github.com/systemd/systemd/blob/c38499d476026d999558a7eee9c95ca2fa41e115/src/udev/net/link-config.c#L218


_______________________________________________
systemd-devel mailing list
systemd-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux