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