--- net/iproute2.sh.old 2011-03-09 17:44:59.780000020 +0100 +++ net/iproute2.sh 2011-03-09 20:56:42.905000020 +0100 @@ -149,17 +149,20 @@ { local family= + # get rid of the first argument, it's useless with the iproute2 module + shift + if [ "$1" = "-A" -o "$1" = "-f" -o "$1" = "-family" ]; then family="-f $2" shift; shift fi - if [ $# -eq 3 ]; then - set -- "$1" "$2" via "$3" - elif [ "$3" = "gw" ]; then - local one=$1 two=$2 - shift; shift; shift - set -- "${one}" "${two}" via "$@" + if [ $# -eq 2 ]; then + set -- "$1" via "$2" + elif [ "$2" = "gw" ]; then + local one=$1 + shift; shift + set -- "${one}" via "$@" fi local cmd= have_metric=false @@ -167,7 +170,6 @@ case "$1" in metric) cmd="${cmd} $1"; have_metric=true;; netmask) cmd="${cmd}/$(_netmask2cidr "$2")"; shift;; - -host|-net);; *) cmd="${cmd} $1";; esac shift