summaryrefslogtreecommitdiffstats
path: root/package/base-files/files
diff options
context:
space:
mode:
authorjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>2009-08-10 23:48:10 +0000
committerjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>2009-08-10 23:48:10 +0000
commit11a916c4dfec837c32695a4c539c58c5e29150b2 (patch)
treee978385589f6cc07a5b16cbcfc32d096d1453870 /package/base-files/files
parentaf934b189ee92cb39a2559c9666b9538b3ba443b (diff)
[package] base-files: move ipv6 module loading from setup_interface() to addif() in the hotplug call, this ensures that ipv6 is loaded before any interfaces or aliases with ip6addr option are configured (#5356)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@17217 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/base-files/files')
-rw-r--r--package/base-files/files/etc/hotplug.d/net/10-net6
-rwxr-xr-xpackage/base-files/files/lib/network/config.sh9
2 files changed, 6 insertions, 9 deletions
diff --git a/package/base-files/files/etc/hotplug.d/net/10-net b/package/base-files/files/etc/hotplug.d/net/10-net
index 06e524444..f46dcd08d 100644
--- a/package/base-files/files/etc/hotplug.d/net/10-net
+++ b/package/base-files/files/etc/hotplug.d/net/10-net
@@ -3,6 +3,12 @@
include /lib/network
addif() {
+ # Ensure that ipv6 is loaded, autoloading happens later but ipv6 might be
+ # required now for interface setup.
+ [ -d /proc/sys/net/ipv6 ] || {
+ grep -q '^ipv6' /etc/modules.d/* && insmod ipv6
+ }
+
# PPP devices are configured by pppd, no need to run setup_interface here
case "$INTERFACE" in
ppp*) return 0;;
diff --git a/package/base-files/files/lib/network/config.sh b/package/base-files/files/lib/network/config.sh
index a5cadf61b..bfadf40c8 100755
--- a/package/base-files/files/lib/network/config.sh
+++ b/package/base-files/files/lib/network/config.sh
@@ -251,15 +251,6 @@ setup_interface() {
sleep 1
}
- # Check whether this interface has an IPv6 address
- # defined and ensure that the kmod is loaded since
- # ifup could be triggered before modules are loaded.
- local hasipv6
- config_get hasipv6 "$config" ip6addr
- [ -n "$hasipv6" ] && [ ! -d /proc/sys/net/ipv6 ] && {
- grep -q '^ipv6' /etc/modules.d/* && insmod ipv6
- }
-
# Interface settings
grep "$iface:" /proc/net/dev > /dev/null && {
local mtu macaddr