summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorJohn Southworth <john.southworth@vyatta.com>2011-09-19 16:46:10 -0500
committerJohn Southworth <john.southworth@vyatta.com>2011-10-27 17:11:30 -0500
commit68ff78c4f2ba121d25139d197fd55d47f33b03c5 (patch)
tree3e02d1c3fd4e5718d3e518b2be1633d7d28df0d6 /scripts
parentb4bb5be6432e67f97a88fe2a1918cf2b0e21546f (diff)
downloadvyatta-op-68ff78c4f2ba121d25139d197fd55d47f33b03c5.tar.gz
vyatta-op-68ff78c4f2ba121d25139d197fd55d47f33b03c5.zip
Fix ipv6 matching in ping and traceroute
(cherry picked from commit c34a0b81b02cb875fcb0822454a9a5eca630a5a6)
Diffstat (limited to 'scripts')
-rw-r--r--scripts/vyatta-ping2
-rw-r--r--scripts/vyatta-traceroute2
2 files changed, 2 insertions, 2 deletions
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