From 02bac4f297ff6ec3f55278372cae905d0bd812bc Mon Sep 17 00:00:00 2001 From: James Bunton Date: Sat, 17 Feb 2024 12:32:14 +1100 Subject: [PATCH 1/1] fix-openwrt-hairpin: run on openwrt AP itself --- hacks/fix-openwrt-hairpin | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/hacks/fix-openwrt-hairpin b/hacks/fix-openwrt-hairpin index 9403ffe..7428461 100755 --- a/hacks/fix-openwrt-hairpin +++ b/hacks/fix-openwrt-hairpin @@ -1,8 +1,11 @@ #!/bin/bash -AP_HOSTS="$(awk '/^Host.*openwrt/ {print $2}' < ~/.ssh/config)" +# /etc/crontabs/root +# m h dom mon dow command +# * * * * * /root/fix-openwrt-hairpin -for host in $AP_HOSTS; do - ssh "$host" 'for f in /sys/devices/virtual/net/*/*wlan*/brport/hairpin_mode; do [ -f $f ] && echo 1 > "$f"; done' +for f in /sys/devices/virtual/net/*/*wlan*/brport/hairpin_mode; do + if [ -f $f ]; then + echo 1 > "$f" + fi done - -- 2.39.2