diff --git a/README.md b/README.md index 4db6b26..f5eb303 100644 --- a/README.md +++ b/README.md @@ -66,7 +66,8 @@ This will delete the container and all associated Docker networks so you can sta In order for WLAN clients to see one another, OpenWrt bridges all interfaces in the LAN zone and sets hairpin mode (aka [reflective relay](https://lwn.net/Articles/347344/)) on the WLAN interface, meaning packets arriving on that interface can be 'reflected' back out through the same interface. -`run.sh` tries to handle this, and prints a warning if it fails. +`run.sh` tries to handle this if `WIFI_HAIRPIN` is set to true, and prints a warning if it fails. +Hairpin mode may not be needed in all cases, but if you experience an issue where Wi-Fi clients are unable to see each other despite AP isolation being disabled, this may fix it. ### Network namespace diff --git a/openwrt.conf.example b/openwrt.conf.example index 87b2e05..380033c 100644 --- a/openwrt.conf.example +++ b/openwrt.conf.example @@ -43,6 +43,8 @@ WIFI_IFACE=wlan0 WIFI_SSID=test123 WIFI_ENCRYPTION=psk2 WIFI_KEY=12345678 +# See README.md for explanation of this mode +WIFI_HAIRPIN=false # Only one of the following sections at a time (5 / 2.4 GHz) are supported! ## 5GHz 802.11ac (if your hw supports it) diff --git a/run.sh b/run.sh index 4c9d35e..81b70f0 100755 --- a/run.sh +++ b/run.sh @@ -89,6 +89,7 @@ function _init_network() { } function _set_hairpin() { + test $WIFI_HAIRPIN = 'true' || return echo -n "* set hairpin mode on interface '$1'" for i in {1..10}; do echo -n '.'