[systemd-commits] man/systemd-networkd.service.xml man/udev.xml src/shared

Tom Gundersen tomegun at kemper.freedesktop.org
Fri Jan 3 11:50:57 PST 2014


 man/systemd-networkd.service.xml |    3 ++-
 man/udev.xml                     |    3 ++-
 src/shared/net-util.c            |    2 +-
 3 files changed, 5 insertions(+), 3 deletions(-)

New commits:
commit 4cd1214db6cf4b262e8ce6381bc710091b375c96
Author: Tom Gundersen <teg at jklm.no>
Date:   Fri Jan 3 20:55:23 2014 +0100

    net-util: add support for Type=ethernet
    
    When DEVTYPE is not set for a nic, it means it is a wired/ethernet
    device.

diff --git a/man/systemd-networkd.service.xml b/man/systemd-networkd.service.xml
index 908354c..f38e813 100644
--- a/man/systemd-networkd.service.xml
+++ b/man/systemd-networkd.service.xml
@@ -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>
diff --git a/man/udev.xml b/man/udev.xml
index 32a520e..0bcb911 100644
--- a/man/udev.xml
+++ b/man/udev.xml
@@ -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>
diff --git a/src/shared/net-util.c b/src/shared/net-util.c
index 8f8cfc9..85278e5 100644
--- a/src/shared/net-util.c
+++ b/src/shared/net-util.c
@@ -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))



More information about the systemd-commits mailing list