[PATCH] fff-hoods: Fix fe80::1 for multiple configap interfaces

Tim Niemeyer tim at tn-x.org
So Okt 15 17:55:51 CEST 2017


Am Sonntag, den 15.10.2017, 16:29 +0200 schrieb Adrian Schmutzler:
> Signed-off-by: Adrian Schmutzler <freifunk at adrianschmutzler.de>
Reviewed-by: Tim Niemeyer <tim at tn-x.org>

Tim

> ---
>  src/packages/fff/fff-hoods/files/usr/sbin/configurehood | 16
> ++++++++++------
>  1 file changed, 10 insertions(+), 6 deletions(-)
> 
> diff --git a/src/packages/fff/fff-hoods/files/usr/sbin/configurehood
> b/src/packages/fff/fff-hoods/files/usr/sbin/configurehood
> index d00e30f..80a8df6 100755
> --- a/src/packages/fff/fff-hoods/files/usr/sbin/configurehood
> +++ b/src/packages/fff/fff-hoods/files/usr/sbin/configurehood
> @@ -36,17 +36,21 @@ chan5ghz="36"
>  if [ -f /tmp/hiddenapflag ]; then
>  	if isGatewayAvailable ; then
>  
> -		uci set network.configap=interface
> -		uci set network.configap.proto='static'
> -		uci set network.configap.ip6addr='fe80::1/64'
> -		uci commit network
> -
>  		for radio in $(uci show wireless | sed -n
> 's,.*\.\([a-z0-9]*\)=wifi-device,\1,p'); do
> -			if ! wifiAddAP "$radio"
> "config.franken.freifunk.net" "configap" "configap" "1"; then
> +			channel=$(uci get
> "wireless.${radio}.channel")
> +			iface="configap2"
> +			if [ "$channel" -gt "14" ]; then
> +				iface="configap5"
> +			fi
> +			uci set network.${iface}=interface
> +			uci set network.${iface}.proto='static'
> +			uci set
> network.${iface}.ip6addr='fe80::1/64'
> +			if ! wifiAddAP "$radio"
> "config.franken.freifunk.net" "$iface" "configap" "1"; then
>  				echo "Can't add Config interface on
> $radio."
>  				exit 1
>  			fi
>  		done
> +		uci commit network
>  
>  		wifi
>  	fi
> -- 
> 2.7.4
> 
-------------- nächster Teil --------------
Ein Dateianhang mit Binärdaten wurde abgetrennt...
Dateiname   : signature.asc
Dateityp    : application/pgp-signature
Dateigröße  : 488 bytes
Beschreibung: This is a digitally signed message part
URL         : <http://lists.freifunk.net/pipermail/franken-dev-freifunk.net/attachments/20171015/fe204470/attachment.sig>


Mehr Informationen über die Mailingliste franken-dev