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;;
local vifmac="$4"
local proto
local macaddr
- local hasipv6
[ -n "$config" ] || {
config=$(find_config "$iface")
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.
- config_get hasipv6 "$config" ip6addr
- [ -n "$hasipv6" ] && [ ! -d /proc/sys/net/ipv6 ] && {
- grep -q '^ipv6' /etc/modules.d/* && insmod ipv6
- }
-
# Interface settings
config_get mtu "$config" mtu
config_get macaddr "$config" macaddr