Skip to content

Commit

Permalink
Merge pull request LibreELEC#3431 from chewitt/iptables-tethering
Browse files Browse the repository at this point in the history
iptables: iptables_helper support for ethernet tethering
  • Loading branch information
CvH authored Apr 17, 2019
2 parents ec94899 + eacc210 commit a81da65
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions packages/network/iptables/scripts/iptables_helper
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit a81da65

Please sign in to comment.