From: James Bunton Date: Mon, 14 Jun 2021 05:07:56 +0000 (+1000) Subject: fix-openwrt-hairpin X-Git-Url: https://code.delx.au/monosys/commitdiff_plain/452db9cad52ee80f4c291dd1ceaee57679bf357a fix-openwrt-hairpin --- diff --git a/hacks/fix-openwrt-hairpin b/hacks/fix-openwrt-hairpin new file mode 100755 index 0000000..43cf038 --- /dev/null +++ b/hacks/fix-openwrt-hairpin @@ -0,0 +1,8 @@ +#!/bin/bash + +AP_HOSTS="$(awk '/^Host.*openwrt/ {print $2}' < ~/.ssh/config | grep -v router)" + +for host in $AP_HOSTS; do + ssh "$host" 'for f in /sys/devices/virtual/net/*/*wlan*/brport/hairpin_mode; do echo 1 > "$f"; done' +done +