summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2010-06-02 17:18:38 +0000
committerJo-Philipp Wich <jow@openwrt.org>2010-06-02 17:18:38 +0000
commitfa244a12659a05cd1668059381d3fd67c01988aa (patch)
tree415c24bc4ea8a2fdee0ef23779386755fbd18412
parentc890f0d4df360b8488a1b9527bb1a82e8f47dac1 (diff)
downloadmtk-20170518-fa244a12659a05cd1668059381d3fd67c01988aa.zip
mtk-20170518-fa244a12659a05cd1668059381d3fd67c01988aa.tar.gz
mtk-20170518-fa244a12659a05cd1668059381d3fd67c01988aa.tar.bz2
base-files: remove IPv6 LL addr from interfaces before adding them to a bridge
SVN-Revision: 21659
-rwxr-xr-xpackage/base-files/files/lib/network/config.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/package/base-files/files/lib/network/config.sh b/package/base-files/files/lib/network/config.sh
index 2ca04fa..1736f8e 100755
--- a/package/base-files/files/lib/network/config.sh
+++ b/package/base-files/files/lib/network/config.sh
@@ -164,6 +164,15 @@ prepare_interface() {
local macaddr
config_get macaddr "$config" macaddr
[ -x /usr/sbin/brctl ] && {
+ # Remove IPv6 link local addr before adding the iface to the bridge
+ local llv6="$(ifconfig "$iface")"
+ case "$llv6" in
+ *fe80:*/64*)
+ llv6="${llv6#* fe80:}"
+ ifconfig "$iface" del "fe80:${llv6%% *}"
+ ;;
+ esac
+
ifconfig "br-$config" 2>/dev/null >/dev/null && {
local newdevs devices
config_get devices "$config" device