1 # Copyright (C) 2006 OpenWrt.org
6 # Ensure that ipv6 is loaded, autoloading happens later but ipv6 might be
7 # required now for interface setup.
8 [ -d /proc/sys/net/ipv6 ] || {
9 grep -q '^ipv6' /etc/modules.d/* && insmod ipv6
12 # PPP devices are configured by pppd, no need to run setup_interface here
14 3g-*|ppp-*|pppoa-*|pppoe-*|pptp-*) return 0;;
18 local cfg="$(find_config "$INTERFACE")"
21 # Skip wireless parent interfaces
22 ath[0-9]|wlan[0-9]) ;;
24 # check the autoload setting
25 config_get auto "$cfg" auto
27 1|on|enabled) setup_interface "$INTERFACE";;
32 # find all vlan configurations for this interface and set them up as well
33 for ifc in $interfaces; do
34 config_get iftype "$ifc" type
35 config_get ifs "$ifc" device
37 [ "${dev%%\.*}" = "$INTERFACE" -a "$dev" != "$INTERFACE" ] && {
48 # find all vlan configurations for this interface and nuke 'em
49 for ifc in $interfaces; do
50 config_get iftype "$ifc" type
51 config_get ifs "$ifc" device
52 confdevs="$(uci_get network.$ifc.ifname)"
54 [ "${dev%%\.*}" = "$INTERFACE" ] && {
55 list_contains confdevs "$dev" || list_remove ifs "$dev"
58 uci_set_state "network" "$ifc" device "$ifs"
64 case "$PHYSDEVDRIVER" in