diff options
author | William Hubbs <w.d.hubbs@gmail.com> | 2012-09-07 14:29:56 -0500 |
---|---|---|
committer | William Hubbs <w.d.hubbs@gmail.com> | 2012-09-07 14:29:56 -0500 |
commit | 444bdfbfc4d1a336233ccc5a29495cc1f523b5a3 (patch) | |
tree | 1416311b5b65ac5644006647b8d7c954149ac564 | |
parent | 8e4169e29e419bfd986455bb809463a3fa433afb (diff) |
oldnet/iproute2.sh: fix carrier detection
We were not testing for carrier correctly when testing for ipv6
tentative addresses.
Reported-by: <ast@domdv.de>
X-Gentoo-Bug: 433012
X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=433012
-rw-r--r-- | net/iproute2.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/iproute2.sh b/net/iproute2.sh index 16186e8e..eb311c87 100644 --- a/net/iproute2.sh +++ b/net/iproute2.sh @@ -212,7 +212,7 @@ _delete_addresses() _has_carrier() { - return 0 + LC_ALL=C ip link show dev "${IFACE}" | grep -q "LOWER_UP" } _tunnel() @@ -287,7 +287,7 @@ iproute2_pre_start() _iproute2_ipv6_tentative() { # Only check tentative when we have a carrier. - LC_ALL=C ip link show dev "${IFACE}" | grep -q "NO-CARRIER" && return 1 + _has_carrier || return 1 LC_ALL=C ip addr show dev "${IFACE}" | \ grep -q "^[[:space:]]*inet6 .* tentative" } |