I want to use match
in my netplan config, but if I attach a vlan to an interface I can no longer match by the mac address of that interface alone. See netplan - match physical ifs only
Proposed solution is to match
the driver
as well as the macaddress
.
From the netplan docs,
match (mapping)
This selects a subset of available physical devices by various hardware
properties. The following configuration will then apply to all matching
devices, as soon as they appear. All specified properties must match.
name (scalar)
...
macaddress (scalar)
...
driver (scalar or sequence of scalars) – sequence since 0.104
Kernel driver name, corresponding to the DRIVER udev property.
A sequence of globs is supported, any of which must match.
Matching on driver is only supported with networkd.
so I need to know the DRIVER udev property. But where can I find that?
I found udev_device_get_driver but I've never worked with C headers like this and I'm not sure what I would give it as an input (struct udev_device *udev_device
)