[systemd-devel] networkd-218 seems to ignore .link files

Lennart Poettering lennart at poettering.net
Tue Apr 21 09:26:06 PDT 2015


On Tue, 21.04.15 14:47, Tom Gundersen (teg at jklm.no) wrote:

> > I'm having a similar problem while running systemd version-219. Did you work
> > out what was wrong?
> >
> > My link file is ignored even when I symlink
> > /etc/systemd/network/99-default.link to /dev/null. I don't see anything
> > interesting in 'journalctl'.
> >
> > # udevadm info /sys/class/net/eth0
> > P: /devices/pci0000:00/0000:00:04.0/0000:01:00.0/net/eth0
> > E: DEVPATH=/devices/pci0000:00/0000:00:04.0/0000:01:00.0/net/eth0
> > E: ID_BUS=pci
> > E: ID_MODEL_FROM_DATABASE=RTL8111/8168/8411 PCI Express Gigabit Ethernet
> > Contror
> > E: ID_MODEL_ID=0x8168
> > E: ID_NET_DRIVER=r8169
> > E: ID_NET_NAME_MAC=enx000db936008c
> > E: ID_NET_NAME_PATH=enp1s0
> > E: ID_OUI_FROM_DATABASE=PC Engines GmbH
> > E: ID_PATH=pci-0000:01:00.0
> > E: ID_PATH_TAG=pci-0000_01_00_0
> > E: ID_PCI_CLASS_FROM_DATABASE=Network controller
> > E: ID_PCI_SUBCLASS_FROM_DATABASE=Ethernet controller
> > E: ID_VENDOR_FROM_DATABASE=Realtek Semiconductor Co., Ltd.
> > E: ID_VENDOR_ID=0x10ec
> > E: IFINDEX=3
> > E: INTERFACE=eth0
> > E: SUBSYSTEM=net
> > E: SYSTEMD_ALIAS=/sys/subsystem/net/devices/eth0
> > E: TAGS=:systemd:
> > E: USEC_INITIALIZED=53326
> >
> >
> > # networkctl status --no-pager eth0
> > ��● 3: eth0
> >    Link File: n/a
> > Network File: n/a
> >         Type: ether
> >        State: off (unmanaged)
> >         Path: pci-0000:01:00.0
> >       Driver: r8169
> >       Vendor: Realtek Semiconductor Co., Ltd.
> >        Model: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
> >   HW Address: 00:0d:b9:36:00:8c (PC Engines GmbH)
> >          MTU: 1500
> >
> >
> > # cat /etc/systemd/network/01-mgmt.link
> > [Match]
> > Path=pci-0000:01:00.0
> > Type=ether
> 
> Type must be the same as what is returned in DEVTYPE=, which I guess
> is unset for this device. So drop this and it should work.
> 
> I see where the confusion stems from though, as we try to be helpful
> and use a heuristic to print a Type in networkctl even when the kernel
> does not expose a type. We probably should not do that, or allow the
> same to be used in the .link matching logic (the heuristic is unlikely
> to be perfect, so I hesitate a bit with the latter).

What precisely is the heuristic? To assume that things are ethernet if
not otherwise specified? Honestly, I think that's good enough, and
probably widely accepted. If this goes wrong I am pretty sure that's
something to fix in the driver, by simply exposing the type then...

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list