chiark / gitweb /
net-match: fix Driver= match
authorTom Gundersen <teg@jklm.no>
Tue, 18 Feb 2014 21:06:49 +0000 (22:06 +0100)
committerTom Gundersen <teg@jklm.no>
Tue, 18 Feb 2014 21:34:26 +0000 (22:34 +0100)
It should match on the driver of the parent device.

TODO
man/systemd-networkd.service.xml
man/udev.xml
src/network/networkd-network.c
src/udev/net/link-config.c

diff --git a/TODO b/TODO
index 925d7a557468f85f02e3cb55e38c059bbc35780d..57c057227b51573fbfec0ebd4994bbcb60d5cad0 100644 (file)
--- a/TODO
+++ b/TODO
@@ -639,7 +639,6 @@ Features:
    - Make sure ID_PATH is always exported and complete for
      network devices where possible, so we can safely rely
      on Path= matching
-   - Check if Driver= is broken, or just my driver (bcma)
 
 * sd-rtnl:
    - add support for exiting containers without reading them fully first
index 9c7ca83438d83c7ab197e38fb65ec0c74f320699..04fedc56d05aa3c4e56cced46135e187894296ae 100644 (file)
                                         <term><varname>Driver</varname></term>
                                         <listitem>
                                                 <para>The driver currently bound to the device, as
-                                                exposed by the udev property <literal>DRIVER</literal>.
+                                                exposed by the udev property <literal>DRIVER</literal>
+                                                of its parent device.
                                                 </para>
                                         </listitem>
                                 </varlistentry>
index 54a2dd33dd89034071678a4dd1e99771bc5e8733..eab5d25f0a556a21c8c69e9f59e4d80b3ecb33a0 100644 (file)
         <varlistentry>
           <term><varname>Driver</varname></term>
           <listitem>
-            <para>The driver currently bound to the device, as exposed by the udev property <literal>DRIVER</literal>.</para>
+            <para>The driver currently bound to the device, as exposed by the
+            udev property <literal>DRIVER</literal> of its parent device.</para>
           </listitem>
         </varlistentry>
         <varlistentry>
index 48131c1f090c1ea7af793a6c158d347771fb4aba..a470c22e3dfedf96a6b7f044a307fd10441c8679 100644 (file)
@@ -178,7 +178,7 @@ int network_get(Manager *manager, struct udev_device *device, Network **ret) {
                                         network->match_name,
                                         udev_device_get_sysattr_value(device, "address"),
                                         udev_device_get_property_value(device, "ID_PATH"),
-                                        udev_device_get_driver(device),
+                                        udev_device_get_driver(udev_device_get_parent(device)),
                                         udev_device_get_devtype(device),
                                         udev_device_get_sysname(device))) {
                         log_debug("%s: found matching network '%s'",
index bd97cd8cf87d2672db439141aea1a440b22d2e00..3afaff10c8cf73626e30ca2aa495f04d6170ee95 100644 (file)
@@ -244,7 +244,7 @@ int link_config_get(link_config_ctx *ctx, struct udev_device *device, link_confi
                                      link->match_driver, link->match_type, NULL,
                                      udev_device_get_sysattr_value(device, "address"),
                                      udev_device_get_property_value(device, "ID_PATH"),
-                                     udev_device_get_driver(device),
+                                     udev_device_get_driver(udev_device_get_parent(device)),
                                      udev_device_get_devtype(device),
                                      NULL)) {
                         log_debug("Config file %s applies to device %s",