diff options
author | Olivier Mehani <olivier.mehani@nicta.com.au> | 2011-06-11 16:16:50 +0200 |
---|---|---|
committer | Rémy Oudompheng <remy@archlinux.org> | 2011-06-11 16:16:50 +0200 |
commit | c0a547316f6585f27c5af4dccb013509ffbb1c22 (patch) | |
tree | daa2a392ffaf4d6ec5b303d64bb2a76fa627b745 /src | |
parent | 3587a2c0737d374c01ea374710eb09671055fdbc (diff) | |
download | netctl-c0a547316f6585f27c5af4dccb013509ffbb1c22.tar.gz netctl-c0a547316f6585f27c5af4dccb013509ffbb1c22.tar.xz |
IPv6: support for IPv6 static routes
Use variable ROUTES6 in the same way as ROUTES to support static IPv6
routes.
Signed-off-by: Olivier Mehani <olivier.mehani@nicta.com.au>
Signed-off-by: Rémy Oudompheng <remy@archlinux.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/connections/ethernet | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/connections/ethernet b/src/connections/ethernet index ebd3a78..3d70d9e 100644 --- a/src/connections/ethernet +++ b/src/connections/ethernet @@ -137,6 +137,16 @@ ethernet_up() { report_iproute "Adding gateway $GATEWAY6 failed" fi fi + + # 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 ;; "") ;; |