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
20 local cfg="$(find_config "$INTERFACE")"
22 # check the autoload setting
23 config_get auto "$cfg" auto
25 1|on|enabled) setup_interface "$INTERFACE";;
29 # find all vlan configurations for this interface and set them up as well
30 for ifc in $interfaces; do
31 config_get iftype "$ifc" type
32 config_get ifs "$ifc" device
34 [ "${dev%%\.*}" = "$INTERFACE" -a "$dev" != "$INTERFACE" ] && {
45 # find all vlan configurations for this interface and nuke 'em
46 for ifc in $interfaces; do
47 config_get iftype "$ifc" type
48 config_get ifs "$ifc" device
49 confdevs="$(uci get network.$ifc.ifname)"
51 [ "${dev%%\.*}" = "$INTERFACE" ] && {
52 list_contains confdevs "$dev" || list_remove ifs "$dev"
55 uci_set_state "network" "$ifc" device "$ifs"
61 case "$PHYSDEVDRIVER" in