From d83fe27201adc7584d052b2d317348dd68fb5d6b Mon Sep 17 00:00:00 2001 From: Phillip Smith Date: Mon, 16 Apr 2012 14:19:42 +1000 Subject: [PATCH] use 'ip route replace' instead of 'ip route add' iproute2 does not allow multiple default gateways in ipv6. this patch uses 'ip route replace' which will replace an existing route, or add a new one if none preexists. --- src/connections/ethernet | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/connections/ethernet b/src/connections/ethernet index 49dfa4c..1c527ee 100644 --- a/src/connections/ethernet +++ b/src/connections/ethernet @@ -181,8 +181,8 @@ ethernet_up() { done fi if [[ -n "$GATEWAY6" ]]; then - report_debug ethernet_iproute_up ip -6 route add default via "$GATEWAY6" dev "$INTERFACE" - if ! ip -6 route add default via "$GATEWAY6" dev "$INTERFACE"; then + report_debug ethernet_iproute_up ip -6 route replace default via "$GATEWAY6" dev "$INTERFACE" + if ! ip -6 route replace default via "$GATEWAY6" dev "$INTERFACE"; then report_iproute "Adding gateway $GATEWAY6 failed" fi fi -- 1.7.10