From 25a0dfb812ecfdba793fa384da9c36e1c8d1608d Mon Sep 17 00:00:00 2001 From: stebifan Date: Sat, 5 Mar 2016 19:46:04 +0100 Subject: [PATCH] Update bataddif.sh.j2 --- files/bataddif.sh.j2 | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/files/bataddif.sh.j2 b/files/bataddif.sh.j2 index c73c58c..b029432 100644 --- a/files/bataddif.sh.j2 +++ b/files/bataddif.sh.j2 @@ -2,23 +2,17 @@ INTERFACE="$3" MAC="$8" brctl=/sbin/brctl -BLACKLISTFILE=/opt/freifunk/tunneldigger-blacklist.txt +BLOCKLISTE=$(/bin/cat /opt/freifunk/tunneldigger-blacklist.txt) wget -q -O /opt/freifunk/tunneldigger-blacklist.txt https://raw.githubusercontent.com/Freifunk-Troisdorf/tunneldigger-blockliste/master/macs.txt -if [ -f $BLACKLISTFILE ] - then - BLOCKLISTE=$(cat /opt/freifunk/tunneldigger-blacklist.txt) - else - touch=$BLOCKLISTE -fi + +/bin/ip link set dev $INTERFACE up mtu 1312 for i in $BLOCKLISTE; do if [[ $i == $MAC ]]; then exit 1 - echo "$MAC wurde blockiert" fi done -/bin/ip link set dev $INTERFACE up mtu 1312 #echo "enabled" > /sys/devices/virtual/net/$INTERFACE/batman_adv/no_rebroadcast $brctl addif br-nodes $INTERFACE