From 156ee04ee88518b84f3388c9f81007b091ad53ed Mon Sep 17 00:00:00 2001 From: mattlongman Date: Wed, 22 Jun 2022 12:51:45 +0100 Subject: [PATCH] Update run.sh Prevent matches for inet6 (`grep 'inet '`) --- hassio-access-point/run.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hassio-access-point/run.sh b/hassio-access-point/run.sh index 88ce3db..da8a3f6 100644 --- a/hassio-access-point/run.sh +++ b/hassio-access-point/run.sh @@ -28,7 +28,7 @@ function cleanup_iptables() { iptables -D FORWARD -i $INTERFACE -o $BASE_INTERFACE -d ${wifi_net} -j DROP fi fi - eth_net=$(ip addr show eth0 | grep inet | awk '{print $2}') + eth_net=$(ip addr show eth0 | grep 'inet ' | awk '{print $2}') if [ ${#eth_net} -ne 0 ]; then iptables -D FORWARD -i $INTERFACE -o eth0 -d ${eth_net} -j DROP fi @@ -289,7 +289,7 @@ if [ $ISOLATION -eq 1 ]; then fi fi # Prevent access to local eth network from AP network - eth_net=$(ip addr show eth0 | grep inet | awk '{print $2}') + eth_net=$(ip addr show eth0 | grep 'inet ' | awk '{print $2}') if [ ${#eth_net} -ne 0 ]; then iptables -I FORWARD -i $INTERFACE -o eth0 -d ${eth_net} -j DROP fi