mirror of
https://github.com/openwrt/packages.git
synced 2026-01-08 10:00:19 +04:00
mwan3: Use /128 for ipv6 if no other source address was found
Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
This commit is contained in:
@@ -140,7 +140,8 @@ main() {
|
||||
# https://bugs.openwrt.org/index.php?do=details&task_id=2897
|
||||
# so get the IP address of the interface and use that instead
|
||||
if echo $track_ip | grep -q ':'; then
|
||||
ADDR=$(ip -6 addr ls dev "$DEVICE" | sed -ne '/\/128/d' -e 's/ *inet6 \([^ \/]*\).* scope global.*/\1/p')
|
||||
ADDR=$(ip -6 addr ls dev "$DEVICE" | sed -ne '/\/128/d' -e 's/ *inet6 \([^ \/]*\).* scope global.*/\1/p' | head -n1)
|
||||
[ -z "$ADDR" ] && ADDR=$(ip -6 addr ls dev "$DEVICE" | sed -ne 's/ *inet6 \([^ \/]*\).* scope global.*/\1/p')
|
||||
ping_protocol=6
|
||||
fi
|
||||
if [ $check_quality -eq 0 ]; then
|
||||
|
||||
Reference in New Issue
Block a user