From 452db9cad52ee80f4c291dd1ceaee57679bf357a Mon Sep 17 00:00:00 2001 From: James Bunton Date: Mon, 14 Jun 2021 15:07:56 +1000 Subject: [PATCH] fix-openwrt-hairpin --- hacks/fix-openwrt-hairpin | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100755 hacks/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 + -- 2.39.2