]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
udev: Do not use MACVTAP for any wireless devices
authorJonatan Schlag <jonatan.schlag@ipfire.org>
Thu, 29 Dec 2016 19:37:31 +0000 (20:37 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 29 Dec 2016 20:34:19 +0000 (20:34 +0000)
Fixes #11179

Signed-off-by: Jonatan Schlag <jonatan.schlag@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
config/udev/network-hotplug-rename

index aaae641e1529fa3cf2120ac0827c1892d4ebf0f4..1f8d5e1177561de591916dff1d96e766896a4036 100644 (file)
@@ -67,11 +67,21 @@ for zone in ${ZONES}; do
 
        # If a matching interface has been found we will
        # print the name to which udev will rename it.
-       if [ "${!mode}" = "macvtap" ]; then
-               echo "${!device}phys"
-       else
-               echo "${!device}"
-       fi
+       case "${!mode}" in
+               macvtap)
+                       # MACVTAP mode doesn't work for WiFi devices
+                       if [ -d "/sys/class/net/${INTERFACE}/phy80211" ]; then
+                               logger -t network "MACVTAP mode is not supported for wireless devices"
+                               echo "${!device}"
+                       else
+                               echo "${!device}phys"
+                       fi
+                       ;;
+
+               *)
+                       echo "${!device}"
+                       ;;
+       esac
 
        exit 0
 done