From 68ff78c4f2ba121d25139d197fd55d47f33b03c5 Mon Sep 17 00:00:00 2001 From: John Southworth Date: Mon, 19 Sep 2011 16:46:10 -0500 Subject: Fix ipv6 matching in ping and traceroute (cherry picked from commit c34a0b81b02cb875fcb0822454a9a5eca630a5a6) --- scripts/vyatta-ping | 2 +- scripts/vyatta-traceroute | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/vyatta-ping b/scripts/vyatta-ping index d454c19..393c0ab 100644 --- a/scripts/vyatta-ping +++ b/scripts/vyatta-ping @@ -17,7 +17,7 @@ else | grep -m1 -E "$ip4regex">/dev/null; then # resolve address and check if it is ipv4 or other /bin/ping ${@:2} $ADDR - elif host $ADDR | awk {' print $4 '} \ + elif host $ADDR | awk {' print $5 '} \ | grep -m1 -E "$ip6regex">/dev/null; then # if ipv6 resolution then ping6 /bin/ping6 ${@:2} $ADDR diff --git a/scripts/vyatta-traceroute b/scripts/vyatta-traceroute index f6dff6b..ca87a6d 100644 --- a/scripts/vyatta-traceroute +++ b/scripts/vyatta-traceroute @@ -17,7 +17,7 @@ else | grep -m1 -E "$ip4regex">/dev/null; then # resolve address and check if it is ipv4 or other /usr/bin/traceroute ${@:2} $ADDR - elif host $ADDR | awk {' print $4 '} \ + elif host $ADDR | awk {' print $5 '} \ | grep -m1 -E "$ip6regex">/dev/null; then # if ipv6 resolution then ping6 /usr/bin/traceroute6 ${@:2} $ADDR -- cgit v1.2.3