From 59b6035c5bc76b2b7877300503ac1489be88a597 Mon Sep 17 00:00:00 2001 From: geb Date: Tue, 21 Jul 2020 20:08:41 +0200 Subject: [PATCH] Add udev rule to disable MAC spoofing for iPhones Tethering (refs: #17820) As MAC spoofing do not work for iPhone ethernet over USB (ipheth), and would anyway not change the device's MAC/IMEI, we explicitely discard it in udev, to allow to use those devices as a fallback when no connection is found, without needed to disable MAC spoofing in the welcome screen. --- .../etc/udev/rules.d/00-mac-spoof.rules | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/config/chroot_local-includes/etc/udev/rules.d/00-mac-spoof.rules b/config/chroot_local-includes/etc/udev/rules.d/00-mac-spoof.rules index f1c6666f5a..4160d69fb4 100644 --- a/config/chroot_local-includes/etc/udev/rules.d/00-mac-spoof.rules +++ b/config/chroot_local-includes/etc/udev/rules.d/00-mac-spoof.rules @@ -1,3 +1,15 @@ # Note: ATTR{type}=="1" means ethernet (ARPHDR_ETHER, see Linux' # sources, beginning of include/linux/if_arp.h) + +# Disable MAC spoofing for the following devices +# iPhone tethering ethernet over USB +SUBSYSTEM=="net", ACTION=="add", ATTR{type}=="1", DRIVERS=="ipheth", GOTO="mac_spoof_ignore" + +# Perform MAC spoofing otherwise SUBSYSTEM=="net", ACTION=="add", ATTR{type}=="1", RUN+="/usr/local/lib/tails-spoof-mac $name" +SUBSYSTEM=="net", ACTION=="add", ATTR{type}=="1", GOTO="mac_spoof_end" + +LABEL="mac_spoof_ignore" +SUBSYSTEM=="net", ACTION=="add", ATTR{type}=="1", RUN+="/usr/bin/logger -t spoof-mac \"MAC spoofing discarded by udev rule for $name ($driver)\"" + +LABEL="mac_spoof_end" -- GitLab