diff options
author | Phillip Smith <phillip.smith@naturesorganics.com.au> | 2012-04-16 06:19:42 +0200 |
---|---|---|
committer | Jouke Witteveen <j.witteveen@gmail.com> | 2012-04-30 17:44:35 +0200 |
commit | 3a38ba466c90ec302fb1914885b290c1012dd957 (patch) | |
tree | 7420565794aa7ad6afe5f28a6b0e0c7ab379255d /src/connections/ethernet | |
parent | 2fb1f1e0c9e7c9f61429762a9664d331b3c74f03 (diff) | |
download | netctl-3a38ba466c90ec302fb1914885b290c1012dd957.tar.gz netctl-3a38ba466c90ec302fb1914885b290c1012dd957.tar.xz |
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.
Diffstat (limited to 'src/connections/ethernet')
-rw-r--r-- | src/connections/ethernet | 4 |
1 files 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 |