mirror of
https://github.com/systemd/systemd.git
synced 2024-12-23 21:35:11 +03:00
net-util: add support for Type=ethernet
When DEVTYPE is not set for a nic, it means it is a wired/ethernet device.
This commit is contained in:
parent
8b264404b6
commit
4cd1214db6
@ -146,7 +146,8 @@
|
||||
<term><varname>Type</varname></term>
|
||||
<listitem>
|
||||
<para>The device type, as exposed by the udev property
|
||||
<literal>DEVTYPE</literal>.</para>
|
||||
<literal>DEVTYPE</literal>, or <literal>ethernet</literal>
|
||||
to match devices without a <literal>DEVTYPE</literal>.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
|
@ -793,7 +793,8 @@
|
||||
<varlistentry>
|
||||
<term><varname>Type</varname></term>
|
||||
<listitem>
|
||||
<para>The device type, as exposed by the udev property <literal>DEVTYPE</literal>.</para>
|
||||
<para>The device type, as exposed by the udev property <literal>DEVTYPE</literal>, or
|
||||
<literal>ethernet</literal> to match a device without a <literal>DEVTYPE</literal>.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
|
@ -49,7 +49,7 @@ bool net_match_config(const struct ether_addr *match_mac,
|
||||
if (match_driver && !streq_ptr(match_driver, dev_driver))
|
||||
return 0;
|
||||
|
||||
if (match_type && !streq_ptr(match_type, dev_type))
|
||||
if (match_type && !streq_ptr(match_type, dev_type) && !(streq(match_type, "ethernet") && !dev_type))
|
||||
return 0;
|
||||
|
||||
if (match_name && !streq_ptr(match_name, dev_name))
|
||||
|
Loading…
Reference in New Issue
Block a user