chiark / gitweb /
check ifindex > 0 instead of subsystem == "net"
[elogind.git] / udev / udev-rules.c
index ab7b6aedb977e16f39687ebc39c017dea75c332f..6b473c4c2ef8a4c116f5a0e740e96d3eab9de7b7 100644 (file)
@@ -2080,7 +2080,7 @@ int udev_rules_apply_to_event(struct udev_rules *rules, struct udev_event *event
 
        can_set_name = ((strcmp(udev_device_get_action(event->dev), "remove") != 0) &&
                        (major(udev_device_get_devnum(event->dev)) > 0 ||
 
        can_set_name = ((strcmp(udev_device_get_action(event->dev), "remove") != 0) &&
                        (major(udev_device_get_devnum(event->dev)) > 0 ||
-                        strcmp(udev_device_get_subsystem(event->dev), "net") == 0));
+                        udev_device_get_ifindex(event->dev) > 0));
 
        /* loop through token list, match, run actions or forward to next rule */
        cur = &rules->tokens[0];
 
        /* loop through token list, match, run actions or forward to next rule */
        cur = &rules->tokens[0];