From eacc210e04ba7f9a9b29bc0cc2d1dc7722d9933b Mon Sep 17 00:00:00 2001 From: chewitt Date: Sat, 30 Mar 2019 05:52:24 +0000 Subject: [PATCH] iptables: iptables_helper support for ethernet tethering --- packages/network/iptables/scripts/iptables_helper | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/packages/network/iptables/scripts/iptables_helper b/packages/network/iptables/scripts/iptables_helper index 6d773f0d69..597978e47f 100755 --- a/packages/network/iptables/scripts/iptables_helper +++ b/packages/network/iptables/scripts/iptables_helper @@ -18,11 +18,14 @@ check_docker() { } check_tether() { - if [ -n "`$CONNMANCTL technologies|grep 'Tethering = True'`" ]; then - $CONNMANCTL tether wifi off - sleep 1 - $CONNMANCTL tether wifi on + if [ -n "`$CONNMANCTL technologies | grep -e -A5 technology/wifi -e 'Tethering = True'`" ]; then + TECHNOLOGY="wifi" + elif [ -n "`$CONNMANCTL technologies | grep -e -A5 technology/ethernet -e 'Tethering = True'`" ]; then + TECHNOLOGY="ethernet" fi + $CONNMANCTL tether $TECHNOLOGY off + sleep 1 + $CONNMANCTL tether $TECHNOLOGY on } flush() {