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)
SVN-Revision: 17217
This commit is contained in:
		@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 | 
				
			|||||||
include $(INCLUDE_DIR)/kernel.mk
 | 
					include $(INCLUDE_DIR)/kernel.mk
 | 
				
			||||||
 | 
					
 | 
				
			||||||
PKG_NAME:=base-files
 | 
					PKG_NAME:=base-files
 | 
				
			||||||
PKG_RELEASE:=25
 | 
					PKG_RELEASE:=26
 | 
				
			||||||
 | 
					
 | 
				
			||||||
PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/
 | 
					PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -3,6 +3,12 @@
 | 
				
			|||||||
include /lib/network
 | 
					include /lib/network
 | 
				
			||||||
 | 
					
 | 
				
			||||||
addif() {
 | 
					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
 | 
						# PPP devices are configured by pppd, no need to run setup_interface here
 | 
				
			||||||
	case "$INTERFACE" in
 | 
						case "$INTERFACE" in
 | 
				
			||||||
		ppp*) return 0;;
 | 
							ppp*) return 0;;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -251,15 +251,6 @@ setup_interface() {
 | 
				
			|||||||
		sleep 1
 | 
							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
 | 
						# Interface settings
 | 
				
			||||||
	grep "$iface:" /proc/net/dev > /dev/null && {
 | 
						grep "$iface:" /proc/net/dev > /dev/null && {
 | 
				
			||||||
		local mtu macaddr
 | 
							local mtu macaddr
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user