From patchwork Mon Jan 22 13:17:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: fff-network: Disable IPv6 on WAN as workaround for ULA bug From: Adrian Schmutzler X-Patchwork-Id: 768 Message-Id: <1516627049-2812-1-git-send-email-freifunk@adrianschmutzler.de> To: franken-dev@freifunk.net Date: Mon, 22 Jan 2018 14:17:29 +0100 This patch disables IPv6 on WAN, so the default route does not block the ULA access anymore. This is a workaround until the underlying problem is fixed. Side condition: - The board name needs to be set up in 50-fff-boardname first Signed-off-by: Adrian Schmutzler --- Not tested. --- .../files/etc/uci-defaults/61-disable-wan-ipv6 | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/packages/fff/fff-network/files/etc/uci-defaults/61-disable-wan-ipv6 diff --git a/src/packages/fff/fff-network/files/etc/uci-defaults/61-disable-wan-ipv6 b/src/packages/fff/fff-network/files/etc/uci-defaults/61-disable-wan-ipv6 new file mode 100644 index 0000000..cf7f400 --- /dev/null +++ b/src/packages/fff/fff-network/files/etc/uci-defaults/61-disable-wan-ipv6 @@ -0,0 +1,17 @@ +#!/bin/sh +# Copyright 2018 Adrian Schmutzler +# License GPLv3 + +sysctlfile="/etc/sysctl.d/90-disablewanipv6.conf" + +BOARD="$(uci get board.model.name)" +. "/etc/network.$BOARD" + +if (! [ "$ONE_PORT" = "YES" ]) && [ "$WANDEV" = "$SWITCHDEV" ] ; then + WANDEV="${SWITCHDEV}.2" +fi +if [ -n "$WANDEV" ]; then + echo "net.ipv6.conf.$WANDEV.autoconf=0" > "$sysctlfile" + echo "net.ipv6.conf.$WANDEV.accept_ra=0" >> "$sysctlfile" + sysctl -p "$sysctlfile" +fi