From 45631856293c36c36a0c5e6df897d46cd5421137 Mon Sep 17 00:00:00 2001 From: Olivier Mehani Date: Tue, 16 Mar 2010 19:16:26 +1100 Subject: [PATCH 3/3] Support for IPv6 static routes Use variable ROUTES6 in the same way as ROUTES to support static IPv6 routes whatever the IP6 configuration parameter is. Signed-off-by: Olivier Mehani --- src/connections/ethernet | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/src/connections/ethernet b/src/connections/ethernet index c97aa18..f185dd0 100644 --- a/src/connections/ethernet +++ b/src/connections/ethernet @@ -168,6 +168,16 @@ ethernet_up() { ;; esac + # Add static IPv6 routes + if [[ -n "$ROUTES6" ]]; then + for route in "${ROUTES6[@]}"; do + report_debug ethernet_iproute_up ip -6 route add $route dev $INTERFACE + if ! ip -6 route add $route dev $INTERFACE ; then + report_iproute "Adding route '$route' failed" + fi + done + fi + if [[ -n "$IP6CFG" && ! -z "$IP6" && "$IP6" != "none" ]]; then for line in "${IP6CFG[@]}"; do -- 1.7.0.2