local iface="$1"
local config="$2"
local vifmac="$3"
local iface="$1"
local config="$2"
local vifmac="$3"
# if we're called for the bridge interface itself, don't bother trying
# to create any interfaces here. The scripts have already done that, otherwise
# if we're called for the bridge interface itself, don't bother trying
# to create any interfaces here. The scripts have already done that, otherwise
[ "br-$config" = "$iface" -o -e "$iface" ] && return 0;
ifconfig "$iface" 2>/dev/null >/dev/null && {
[ "br-$config" = "$iface" -o -e "$iface" ] && return 0;
ifconfig "$iface" 2>/dev/null >/dev/null && {
- # make sure the interface is removed from any existing bridge and deconfigured
- ifconfig "$iface" 0.0.0.0
+ config_get proto "$config" proto
+
+ # make sure the interface is removed from any existing bridge and deconfigured,
+ # (deconfigured only if the interface is not set to proto=none)
+ [ "$proto" = none ] || ifconfig "$iface" 0.0.0.0
# Change interface MAC address if requested
[ -n "$vifmac" ] && {
# Change interface MAC address if requested
[ -n "$vifmac" ] && {
+ [ "$proto" = none ] || {
+ for ifn in `ifconfig | grep "^$iface:" | awk '{print $1}'`; do
+ ifconfig "$ifn" down
+ done
+ }
config_set "$config" aliases ""
config_set "$config" alias_count 0
config_foreach setup_interface_alias alias "$config" "$iface"
config_set "$config" aliases ""
config_set "$config" alias_count 0
config_foreach setup_interface_alias alias "$config" "$iface"