# match interface type
ENV{MATCHIFTYPE}="$attr{type}"
+# match interface dev_id
+ATTR{dev_id}=="?*", ENV{MATCHDEVID}="$attr{dev_id}"
+
# do not use "locally administered" MAC address
ENV{MATCHADDR}=="?[2367abef]:*", ENV{MATCHADDR}=""
# variables used to communicate:
# MATCHADDR MAC address used for the match
# MATCHID bus_id used for the match
+# MATCHDEVID dev_id used for the match
# MATCHDRV driver name used for the match
# MATCHIFTYPE interface type match
# COMMENT comment to add to the generated rule
match="$match, DRIVERS==\"$MATCHDRV\""
fi
+if [ "$MATCHDEVID" ]; then
+ match="$match, ATTR{dev_id}==\"$MATCHDEVID\""
+fi
+
if [ "$MATCHID" ]; then
match="$match, KERNELS==\"$MATCHID\""
fi