Merge pull request #3431 from chewitt/iptables-tethering

iptables: iptables_helper support for ethernet tethering
This commit is contained in:
CvH 2019-04-17 08:00:37 +02:00 committed by GitHub
commit a81da65281
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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() {