[package] base-files: move ipv6 module loading from setup_interface() to addif()...
authorJo-Philipp Wich <jow@openwrt.org>
Mon, 10 Aug 2009 23:48:10 +0000 (23:48 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Mon, 10 Aug 2009 23:48:10 +0000 (23:48 +0000)
SVN-Revision: 17217

package/base-files/Makefile
package/base-files/files/etc/hotplug.d/net/10-net
package/base-files/files/lib/network/config.sh

index 6901829f29290604942631537d1ca83667a5cad9..fb7debf96c4ee36f492877b7d0a1ae301109cdd9 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=base-files
-PKG_RELEASE:=25
+PKG_RELEASE:=26
 
 PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/
 
index 06e5244447ec669f2194dc6c59e9a22b2859ed4c..f46dcd08d6ea970ea157884d0e72f9d21c398768 100644 (file)
@@ -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;;
index a5cadf61bdba262a407c687beedb0eaac711fc9f..bfadf40c89e8577ab16f488e15c647b6c5dec926 100755 (executable)
@@ -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