summaryrefslogtreecommitdiff
path: root/package/base-files/files
diff options
context:
space:
mode:
authorVasilis Tsiligiannis <acinonyx@openwrt.gr>2011-09-14 13:37:44 +0000
committerVasilis Tsiligiannis <acinonyx@openwrt.gr>2011-09-14 13:37:44 +0000
commit98372a8eb51cafa81f0e31672669dc23d745d109 (patch)
tree16746edc36f530dbc6b04b3196b1f6fac4e4cc2c /package/base-files/files
parent200fd7bce1013e4830cc799cf3ff0a24c502a77f (diff)
downloadmtk-20170518-98372a8eb51cafa81f0e31672669dc23d745d109.zip
mtk-20170518-98372a8eb51cafa81f0e31672669dc23d745d109.tar.gz
mtk-20170518-98372a8eb51cafa81f0e31672669dc23d745d109.tar.bz2
base-files: Fix IPv6 address and route adding on aliases with no IPv4 address configured
SVN-Revision: 28241
Diffstat (limited to 'package/base-files/files')
-rwxr-xr-xpackage/base-files/files/lib/network/config.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/package/base-files/files/lib/network/config.sh b/package/base-files/files/lib/network/config.sh
index cf5b197..5b349a7 100755
--- a/package/base-files/files/lib/network/config.sh
+++ b/package/base-files/files/lib/network/config.sh
@@ -261,9 +261,9 @@ setup_interface_static() {
esac
[ -z "$ipaddr" ] || $DEBUG ifconfig "$iface" "$ipaddr" netmask "$netmask" broadcast "${bcast:-+}"
- [ -z "$ip6addr" ] || $DEBUG ifconfig "$iface" add "$ip6addr"
+ [ -z "$ip6addr" ] || $DEBUG ifconfig "${iface%:*}" add "$ip6addr"
[ -z "$gateway" ] || $DEBUG route add default gw "$gateway" ${metric:+metric $metric} dev "$iface"
- [ -z "$ip6gw" ] || $DEBUG route -A inet6 add default gw "$ip6gw" ${metric:+metric $metric} dev "$iface"
+ [ -z "$ip6gw" ] || $DEBUG route -A inet6 add default gw "$ip6gw" ${metric:+metric $metric} dev "${iface%:*}"
[ -z "$dns" ] || add_dns "$config" $dns
config_get type "$config" TYPE