summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Mazoyer <respawneral@gmail.com>2014-12-13 02:24:05 +0100
committerGuillaume Mazoyer <respawneral@gmail.com>2014-12-13 02:24:05 +0100
commit4c5b4b628186d8acea0a814423661e1d8cebc695 (patch)
tree947b1c13f321613860732ac83e2572bd410f3a95
parent92f424a4c673f0c5d94ae3948cb520bb5266e4b1 (diff)
Fix for Cisco routers, no source for traceroute in IPv6, really?
-rw-r--r--routers/cisco.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/routers/cisco.php b/routers/cisco.php
index 1bda2ff..cc5b05d 100644
--- a/routers/cisco.php
+++ b/routers/cisco.php
@@ -57,7 +57,7 @@ final class Cisco extends Router {
if (match_ipv4($destination)) {
$traceroute = 'traceroute ip '.$fqdn;
} else if (match_ipv6($destination)) {
- $traceroute = 'traceroute ipv6 '.$fqdn;
+ $traceroute = 'traceroute '.$fqdn;
} else {
throw new Exception('The parameter does not resolve to an IPv4/IPv6 address.');
}
@@ -65,7 +65,8 @@ final class Cisco extends Router {
throw new Exception('The parameter is not an IPv4/IPv6 address or a FQDN.');
}
- if (($traceroute != null) && $this->has_source_interface_id()) {
+ if (($traceroute != null) && $this->has_source_interface_id() &&
+ !match_ipv6($destination)) {
$traceroute .= ' source '.$this->get_source_interface_id();
}