--- ifdown-removable.orig 2008-07-14 19:02:45 +0400 +++ ifdown-removable 2009-08-17 15:38:18 +0400 @@ -85,6 +85,20 @@ } fi +# get ipv4 and/or ipv6 addresses of the interface. get them in any way +# (interface can be "down", but has addresses) +is_yes "$CONFIG_IPV4" && SourceIfNotEmpty $SCRIPTDIR/functions-ipv4 && IPV4ADDRESS="$(get_ipv4_addresses $NAME)" +is_yes "$CONFIG_IPV6" && SourceIfNotEmpty $SCRIPTDIR/functions-ipv6 && IPV6ADDRESS="$(get_ipv6_addresses $NAME)" + +# stop QoS and FireWall before iproute2 rules stop +is_yes "$CONFIG_QOS" && $SCRIPTDIR/config-qos $NAME stop "${IPV4ADDRESS[*]}" "${IPV6ADDRESS[*]}" +is_yes "$CONFIG_FW" && $SCRIPTDIR/config-fw $NAME stop "${IPV4ADDRESS[*]}" "${IPV6ADDRESS[*]}" + +# ifup-common reverse order +is_yes "$CONFIG_IPX" && $SCRIPTDIR/config-ipx $NAME stop +is_yes "$CONFIG_IPV6" && $SCRIPTDIR/config-ipv6 $NAME stop "${IPV4ADDRESS[*]}" "${IPV6ADDRESS[*]}" +is_yes "$CONFIG_IPV4" && $SCRIPTDIR/config-ipv4 $NAME stop "${IPV4ADDRESS[*]}" "${IPV6ADDRESS[*]}" + # common part is_yes "$IFDOWN_CHILDREN" && ifdown_children xargise_file $MYIFACEDIR/ipneigh "$IP neigh del dev $NAME"