summaryrefslogtreecommitdiff
path: root/udev/udev-event.c
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2010-12-14 11:27:02 +0100
committerKay Sievers <kay.sievers@vrfy.org>2010-12-14 11:27:02 +0100
commitff0e1f4e5d897a0ddbf365e920c0e28a6657abaa (patch)
tree35436cbfff494af264646e8d6358baba17418713 /udev/udev-event.c
parent14996e80d4b002dbbef9721b936fe29155375fb1 (diff)
check ifindex > 0 instead of subsystem == "net"
Diffstat (limited to 'udev/udev-event.c')
-rw-r--r--udev/udev-event.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/udev/udev-event.c b/udev/udev-event.c
index f41f06b16a..02a1767b1f 100644
--- a/udev/udev-event.c
+++ b/udev/udev-event.c
@@ -564,7 +564,7 @@ int udev_event_execute_rules(struct udev_event *event, struct udev_rules *rules)
udev_rules_apply_to_event(rules, event);
/* rename a new network interface, if needed */
- if (strcmp(udev_device_get_subsystem(dev), "net") == 0 && strcmp(udev_device_get_action(dev), "add") == 0 &&
+ if (udev_device_get_ifindex(dev) > 0 && strcmp(udev_device_get_action(dev), "add") == 0 &&
event->name != NULL && strcmp(event->name, udev_device_get_sysname(dev)) != 0) {
char syspath[UTIL_PATH_SIZE];
char *pos;