summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2008-07-07 15:20:06 -0700
committerStephen Hemminger <stephen.hemminger@vyatta.com>2008-07-07 15:20:06 -0700
commit8497bf5a76f8753710e1ae826a8b5e2ccbe46426 (patch)
tree911f04a35d18a27717c844fa4387deb10d3b2ac6
parent77caec4a1e442aa3bfc393c7347281364ce13dc9 (diff)
parent4a9dadf356a83ee0270d3848c506d1ca969d2565 (diff)
downloadvyatta-op-8497bf5a76f8753710e1ae826a8b5e2ccbe46426.tar.gz
vyatta-op-8497bf5a76f8753710e1ae826a8b5e2ccbe46426.zip
Merge branch 'hollywood' of suva.vyatta.com:/git/vyatta-op into hollywood
-rw-r--r--debian/changelog73
-rw-r--r--etc/bash_completion.d/10vyatta-op10
-rwxr-xr-xscripts/vyatta-show-version6
-rw-r--r--scripts/vyatta-tshark-interface-port.pl36
-rw-r--r--templates/clear/dhcp/client/node.def1
-rw-r--r--templates/clear/dhcp/client/process/node.def2
-rw-r--r--templates/node.def1
-rw-r--r--templates/release/dhcp/interface/node.def1
-rw-r--r--templates/release/dhcp/interface/node.tag/node.def9
-rw-r--r--templates/release/dhcp/node.def1
-rw-r--r--templates/release/node.def1
-rw-r--r--templates/renew/dhcp/interface/node.def1
-rw-r--r--templates/renew/dhcp/interface/node.tag/node.def9
-rw-r--r--templates/renew/dhcp/node.def1
-rw-r--r--templates/renew/node.def1
-rw-r--r--templates/show/interfaces/bridge/node.tag/capture/node.def2
-rw-r--r--templates/show/interfaces/bridge/node.tag/capture/not/node.def1
-rw-r--r--templates/show/interfaces/bridge/node.tag/capture/not/port/node.def1
-rw-r--r--templates/show/interfaces/bridge/node.tag/capture/not/port/node.tag/node.def4
-rw-r--r--templates/show/interfaces/bridge/node.tag/capture/port/node.def1
-rw-r--r--templates/show/interfaces/bridge/node.tag/capture/port/node.tag/node.def3
-rw-r--r--templates/show/interfaces/ethernet/node.tag/vif/node.tag/capture/node.def2
-rw-r--r--templates/show/interfaces/ethernet/node.tag/vif/node.tag/capture/not/node.def1
-rw-r--r--templates/show/interfaces/ethernet/node.tag/vif/node.tag/capture/not/port/node.def1
-rw-r--r--templates/show/interfaces/ethernet/node.tag/vif/node.tag/capture/not/port/node.tag/node.def3
-rw-r--r--templates/show/interfaces/ethernet/node.tag/vif/node.tag/capture/port/node.def1
-rw-r--r--templates/show/interfaces/ethernet/node.tag/vif/node.tag/capture/port/node.tag/node.def3
-rw-r--r--templates/show/interfaces/loopback/node.tag/capture/node.def2
-rw-r--r--templates/show/interfaces/loopback/node.tag/capture/not/node.def1
-rw-r--r--templates/show/interfaces/loopback/node.tag/capture/not/port/node.def1
-rw-r--r--templates/show/interfaces/loopback/node.tag/capture/not/port/node.tag/node.def3
-rw-r--r--templates/show/interfaces/loopback/node.tag/capture/port/node.def1
-rw-r--r--templates/show/interfaces/loopback/node.tag/capture/port/node.tag/node.def3
-rw-r--r--templates/show/interfaces/tunnel/node.tag/capture/node.def2
-rw-r--r--templates/show/interfaces/tunnel/node.tag/capture/not/node.def1
-rw-r--r--templates/show/interfaces/tunnel/node.tag/capture/not/port/node.def1
-rw-r--r--templates/show/interfaces/tunnel/node.tag/capture/not/port/node.tag/node.def3
-rw-r--r--templates/show/interfaces/tunnel/node.tag/capture/port/node.def1
-rw-r--r--templates/show/interfaces/tunnel/node.tag/capture/port/node.tag/node.def3
-rw-r--r--templates/traceroute/node.tag/node.def22
40 files changed, 201 insertions, 19 deletions
diff --git a/debian/changelog b/debian/changelog
index 86f1820..b539a82 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,76 @@
+vyatta-op (0.10) unstable; urgency=low
+
+ 3.1.0
+ [ Mark O'Brien ]
+
+
+ [ Stephen Hemminger ]
+ * Do chomp in accessor routine for sysfs
+ * add completions for show files
+
+ [ Stig Thormodsrud ]
+ * Add sanity check if getlogin() fails.
+
+ [ Stephen Hemminger ]
+ * Fix use of invalid variable
+
+ [ Stig Thormodsrud ]
+ * Fix 3328: operator can't issue "show vrrp"
+ * Fix 787: Add command to force vrrp state transition to backup.
+ * Fix 88: Feature Request: Reboot Command (add confirmation)
+ * Fix 2705: Add "clear vrrp process" command.
+ * Fix 3155: setting the third vrrp member with the highest priority
+ doesn't change (update) the backup
+
+ [ rbalocca ]
+ * Ignore derived files
+
+ [ Stephen Hemminger ]
+ * Use perl to read sysfs directly
+
+ [ rbalocca ]
+ * Convert to our method of changelog creation
+
+ [ Stig Thormodsrud ]
+ * Fix 3233: dhcp client doesn't work on bridge interface
+
+ [ Bob Gilligan ]
+ * Bugfix: 3228
+ * Bugfix: 2858
+ * Enable display of info about ADSL interfaces.
+
+ [ Mohit Mehta ]
+ * Fix Bug 3069 Help strings should be standardized
+ * Fix Bug 3069 Help strings should be standardized
+ * Fix Bug 3069 Help strings should be standardized
+ * Fix Bug 1059 Feature Request: integrate 'tcpdump' and 'tethereal'
+ into Vyatta CLI
+ * Fix Bug 3069 Help strings should be standardized
+
+ [ Stig Thormodsrud ]
+ * Fix 3062: "Show interfaces" displays interfaces in lexicographic,
+ not numeric, order
+
+ [ Mohit Mehta ]
+ * Fix Bug 2871 Internal errors reported with traceroute
+
+ [ Tom Grennan ]
+ * record selected vtysh (vyatta-quagga vs quagga) in exported shell
+ variable
+ * donot pipe through VYATTA_PAGER if run_cmd begins with LESSOPEN,
+ less, pager, or tail
+ * use less prompt to display the "show" content
+ * fix typo in bug fix 3017
+ * this is an architecture independent package
+ * fix bug 3017
+
+ [ Mohit Mehta ]
+ * Fix Bug 802 VRRP - add "show vrrp summary" command (TC 3.2.5.7.2)
+
+ [ Mark O'Brien ]
+
+ -- Mark O'Brien <mobrien@firebolt.vyatta.com> Tue, 17 Jun 2008 09:27:18 -0700
+
vyatta-op (0.9) unstable; urgency=low
3.0.5
diff --git a/etc/bash_completion.d/10vyatta-op b/etc/bash_completion.d/10vyatta-op
index fe3163c..4735462 100644
--- a/etc/bash_completion.d/10vyatta-op
+++ b/etc/bash_completion.d/10vyatta-op
@@ -434,11 +434,6 @@ fi
alias vtysh=$_vyatta_vtysh
-# don't initialize if we are in configure mode
-if [ "$_OFR_CONFIGURE" == "ok" ]; then
- return 0
-fi
-
nullglob_save=$( shopt -p nullglob )
shopt -s nullglob
for f in ${vyatta_datadir}/vyatta-op/functions/allowed/* ; do
@@ -447,6 +442,11 @@ done
eval $nullglob_save
unset nullglob_save
+# don't initialize if we are in configure mode
+if [ "$_OFR_CONFIGURE" == "ok" ]; then
+ return 0
+fi
+
_vyatta_op_init $@
### Local Variables:
diff --git a/scripts/vyatta-show-version b/scripts/vyatta-show-version
index 587f17e..f609930 100755
--- a/scripts/vyatta-show-version
+++ b/scripts/vyatta-show-version
@@ -84,7 +84,7 @@ sub read_pkg_file {
sub show_added {
for my $name (sort keys %$rHoH_now_debs) {
if (!$rHoH_base_debs->{$name}) {
- printf("Aii %-25s%-25s\n",
+ printf("Aii %-25s %-25s\n",
$name, $rHoH_now_debs->{$name}->{'version'});
}
}
@@ -93,7 +93,7 @@ sub show_added {
sub show_deleted {
for my $name (sort keys %$rHoH_base_debs) {
if (!$rHoH_now_debs->{$name}) {
- printf("X %-25s%-25s\n",
+ printf("X %-25s %-25s\n",
$name, $rHoH_base_debs->{$name}->{'version'});
}
}
@@ -117,7 +117,7 @@ sub show_upgraded_downgraded {
if ($ver_base ne $ver_now) {
$cmd = "dpkg --compare-versions \"$ver_base\" $op \"$ver_now\"";
if (!system($cmd)) {
- printf("%sii %-25s%-20s (baseline: %s)\n",
+ printf("%sii %-25s %-20s (baseline: %s)\n",
$symbol, $name, $ver_now, $ver_base);
}
}
diff --git a/scripts/vyatta-tshark-interface-port.pl b/scripts/vyatta-tshark-interface-port.pl
index 4eff322..aa750e5 100644
--- a/scripts/vyatta-tshark-interface-port.pl
+++ b/scripts/vyatta-tshark-interface-port.pl
@@ -28,12 +28,39 @@ use lib "/opt/vyatta/share/perl5/";
use strict;
use warnings;
+sub check_if_interface_is_tsharkable {
+ my $interface = shift;
+
+ my @grep_tshark_interfaces = `sudo /usr/bin/tshark -D | grep $interface`;
+ my $any_interface;
+
+ for my $count (0 .. $#grep_tshark_interfaces) {
+ my @temp = split(/ /,$grep_tshark_interfaces[$count]);
+ chomp $temp[1];
+ $grep_tshark_interfaces[$count] = $temp[1];
+ }
+
+ my $exact_match = 0;
+ for my $count (0 .. $#grep_tshark_interfaces) {
+ if ($grep_tshark_interfaces[$count] eq $interface) {
+ $exact_match = 1;
+ $any_interface = $grep_tshark_interfaces[$count];
+ }
+ }
+ if ($exact_match == 0 || $any_interface eq 'any') {
+ print "Unable to capture traffic on $interface\n";
+ exit 1;
+ }
+}
+
#
# main
#
my $intf = $ARGV[0];
+check_if_interface_is_tsharkable($intf);
+
if ($#ARGV > 0){
my $port = $ARGV[1];
my $not_port = $ARGV[2];
@@ -43,9 +70,11 @@ if ($#ARGV > 0){
} else {
if (($port > 0) and ($port < 65536)){
if ($not_port == 0){
- exec "sudo /usr/bin/tshark -n -i $intf port $port";
+ print "Capturing traffic on $intf port $port ...\n";
+ exec "sudo /usr/bin/tshark -n -i $intf port $port 2> /dev/null";
} else {
- exec "sudo /usr/bin/tshark -n -i $intf not port $port";
+ print "Capturing traffic on $intf excluding port $port ...\n";
+ exec "sudo /usr/bin/tshark -n -i $intf not port $port 2> /dev/null";
}
} else {
print "Invalid port number. Allowed values: <1-65535>\n";
@@ -54,7 +83,8 @@ if ($#ARGV > 0){
}
} else {
- exec "sudo /usr/bin/tshark -n -i $intf";
+ print "Capturing traffic on $intf ...\n";
+ exec "sudo /usr/bin/tshark -n -i $intf 2> /dev/null";
}
exit 0;
diff --git a/templates/clear/dhcp/client/node.def b/templates/clear/dhcp/client/node.def
deleted file mode 100644
index 1c658f0..0000000
--- a/templates/clear/dhcp/client/node.def
+++ /dev/null
@@ -1 +0,0 @@
-help: Clear DHCP client information
diff --git a/templates/clear/dhcp/client/process/node.def b/templates/clear/dhcp/client/process/node.def
deleted file mode 100644
index c83dace..0000000
--- a/templates/clear/dhcp/client/process/node.def
+++ /dev/null
@@ -1,2 +0,0 @@
-help: Restart the DHCP client process
-run: sudo ${vyatta_bindir}/sudo-users/vyatta-interfaces.pl --restart-dhclient
diff --git a/templates/node.def b/templates/node.def
new file mode 100644
index 0000000..8d1c8b6
--- /dev/null
+++ b/templates/node.def
@@ -0,0 +1 @@
+
diff --git a/templates/release/dhcp/interface/node.def b/templates/release/dhcp/interface/node.def
new file mode 100644
index 0000000..e65989f
--- /dev/null
+++ b/templates/release/dhcp/interface/node.def
@@ -0,0 +1 @@
+help: Release DHCP client lease for specified interface
diff --git a/templates/release/dhcp/interface/node.tag/node.def b/templates/release/dhcp/interface/node.tag/node.def
new file mode 100644
index 0000000..2fadea2
--- /dev/null
+++ b/templates/release/dhcp/interface/node.tag/node.def
@@ -0,0 +1,9 @@
+help: Release DHCP IP address lease for specified interface
+allowed:
+ local -a array ;
+ array=( /var/lib/dhcp3/eth* ) ;
+ echo -n ${array[@]##*/}
+
+run:
+ IFNAME=${4}
+ sudo /opt/vyatta/bin/sudo-users/vyatta-interfaces.pl --op-command "dhcp-release" --dev "$IFNAME"
diff --git a/templates/release/dhcp/node.def b/templates/release/dhcp/node.def
new file mode 100644
index 0000000..03365d7
--- /dev/null
+++ b/templates/release/dhcp/node.def
@@ -0,0 +1 @@
+help: Release DHCP client lease
diff --git a/templates/release/node.def b/templates/release/node.def
new file mode 100644
index 0000000..36c8901
--- /dev/null
+++ b/templates/release/node.def
@@ -0,0 +1 @@
+help: Release specified variable
diff --git a/templates/renew/dhcp/interface/node.def b/templates/renew/dhcp/interface/node.def
new file mode 100644
index 0000000..87993a9
--- /dev/null
+++ b/templates/renew/dhcp/interface/node.def
@@ -0,0 +1 @@
+help: Renew DHCP client lease for specified interface
diff --git a/templates/renew/dhcp/interface/node.tag/node.def b/templates/renew/dhcp/interface/node.tag/node.def
new file mode 100644
index 0000000..9952a49
--- /dev/null
+++ b/templates/renew/dhcp/interface/node.tag/node.def
@@ -0,0 +1,9 @@
+help: Renew DHCP IP address lease for specified interface
+allowed:
+ local -a array ;
+ array=( /var/lib/dhcp3/eth* ) ;
+ echo -n ${array[@]##*/}
+
+run:
+ IFNAME=${4}
+ sudo /opt/vyatta/bin/sudo-users/vyatta-interfaces.pl --op-command "dhcp-renew" --dev "$IFNAME"
diff --git a/templates/renew/dhcp/node.def b/templates/renew/dhcp/node.def
new file mode 100644
index 0000000..78b64fb
--- /dev/null
+++ b/templates/renew/dhcp/node.def
@@ -0,0 +1 @@
+help: Renew DHCP client lease
diff --git a/templates/renew/node.def b/templates/renew/node.def
new file mode 100644
index 0000000..9b4c9d4
--- /dev/null
+++ b/templates/renew/node.def
@@ -0,0 +1 @@
+help: Renew specified variable
diff --git a/templates/show/interfaces/bridge/node.tag/capture/node.def b/templates/show/interfaces/bridge/node.tag/capture/node.def
new file mode 100644
index 0000000..ef86b9c
--- /dev/null
+++ b/templates/show/interfaces/bridge/node.tag/capture/node.def
@@ -0,0 +1,2 @@
+help: Show captured traffic on specified bridge interface
+run: /opt/vyatta/bin/vyatta-tshark-interface-port.pl "$4"
diff --git a/templates/show/interfaces/bridge/node.tag/capture/not/node.def b/templates/show/interfaces/bridge/node.tag/capture/not/node.def
new file mode 100644
index 0000000..ecae454
--- /dev/null
+++ b/templates/show/interfaces/bridge/node.tag/capture/not/node.def
@@ -0,0 +1 @@
+help: Show captured traffic excluding the specified bridge interface port
diff --git a/templates/show/interfaces/bridge/node.tag/capture/not/port/node.def b/templates/show/interfaces/bridge/node.tag/capture/not/port/node.def
new file mode 100644
index 0000000..ecae454
--- /dev/null
+++ b/templates/show/interfaces/bridge/node.tag/capture/not/port/node.def
@@ -0,0 +1 @@
+help: Show captured traffic excluding the specified bridge interface port
diff --git a/templates/show/interfaces/bridge/node.tag/capture/not/port/node.tag/node.def b/templates/show/interfaces/bridge/node.tag/capture/not/port/node.tag/node.def
new file mode 100644
index 0000000..271106c
--- /dev/null
+++ b/templates/show/interfaces/bridge/node.tag/capture/not/port/node.tag/node.def
@@ -0,0 +1,4 @@
+help: Show captured traffic excluding the specified bridge interface port
+run: /opt/vyatta/bin/vyatta-tshark-interface-port.pl "$4" "$8" 1
+allowed: echo -n '<1-65535>'
+
diff --git a/templates/show/interfaces/bridge/node.tag/capture/port/node.def b/templates/show/interfaces/bridge/node.tag/capture/port/node.def
new file mode 100644
index 0000000..43d1b9c
--- /dev/null
+++ b/templates/show/interfaces/bridge/node.tag/capture/port/node.def
@@ -0,0 +1 @@
+help: Show captured traffic on specified bridge interface port
diff --git a/templates/show/interfaces/bridge/node.tag/capture/port/node.tag/node.def b/templates/show/interfaces/bridge/node.tag/capture/port/node.tag/node.def
new file mode 100644
index 0000000..7ad54b7
--- /dev/null
+++ b/templates/show/interfaces/bridge/node.tag/capture/port/node.tag/node.def
@@ -0,0 +1,3 @@
+help: Show captured traffic on specified bridge interface port
+run: /opt/vyatta/bin/vyatta-tshark-interface-port.pl "$4" "$7" 0
+allowed: echo -n '<1-65535>'
diff --git a/templates/show/interfaces/ethernet/node.tag/vif/node.tag/capture/node.def b/templates/show/interfaces/ethernet/node.tag/vif/node.tag/capture/node.def
new file mode 100644
index 0000000..190fd2f
--- /dev/null
+++ b/templates/show/interfaces/ethernet/node.tag/vif/node.tag/capture/node.def
@@ -0,0 +1,2 @@
+help: Show captured traffic on specified ethernet virtual interface
+run: /opt/vyatta/bin/vyatta-tshark-interface-port.pl "$4.$6"
diff --git a/templates/show/interfaces/ethernet/node.tag/vif/node.tag/capture/not/node.def b/templates/show/interfaces/ethernet/node.tag/vif/node.tag/capture/not/node.def
new file mode 100644
index 0000000..7328773
--- /dev/null
+++ b/templates/show/interfaces/ethernet/node.tag/vif/node.tag/capture/not/node.def
@@ -0,0 +1 @@
+help: Show captured traffic excluding the specified ethernet virtual interface port
diff --git a/templates/show/interfaces/ethernet/node.tag/vif/node.tag/capture/not/port/node.def b/templates/show/interfaces/ethernet/node.tag/vif/node.tag/capture/not/port/node.def
new file mode 100644
index 0000000..7328773
--- /dev/null
+++ b/templates/show/interfaces/ethernet/node.tag/vif/node.tag/capture/not/port/node.def
@@ -0,0 +1 @@
+help: Show captured traffic excluding the specified ethernet virtual interface port
diff --git a/templates/show/interfaces/ethernet/node.tag/vif/node.tag/capture/not/port/node.tag/node.def b/templates/show/interfaces/ethernet/node.tag/vif/node.tag/capture/not/port/node.tag/node.def
new file mode 100644
index 0000000..258c6dc
--- /dev/null
+++ b/templates/show/interfaces/ethernet/node.tag/vif/node.tag/capture/not/port/node.tag/node.def
@@ -0,0 +1,3 @@
+help: Show captured traffic excluding the specified ethernet interface port
+run: /opt/vyatta/bin/vyatta-tshark-interface-port.pl "$4.$6" "${10}" 1
+allowed: echo -n '<1-65535>'
diff --git a/templates/show/interfaces/ethernet/node.tag/vif/node.tag/capture/port/node.def b/templates/show/interfaces/ethernet/node.tag/vif/node.tag/capture/port/node.def
new file mode 100644
index 0000000..d61d229
--- /dev/null
+++ b/templates/show/interfaces/ethernet/node.tag/vif/node.tag/capture/port/node.def
@@ -0,0 +1 @@
+help: Show captured traffic on specified ethernet virtual interface port
diff --git a/templates/show/interfaces/ethernet/node.tag/vif/node.tag/capture/port/node.tag/node.def b/templates/show/interfaces/ethernet/node.tag/vif/node.tag/capture/port/node.tag/node.def
new file mode 100644
index 0000000..4090508
--- /dev/null
+++ b/templates/show/interfaces/ethernet/node.tag/vif/node.tag/capture/port/node.tag/node.def
@@ -0,0 +1,3 @@
+help: Show captured traffic on specified ethernet virtual interface port
+run: /opt/vyatta/bin/vyatta-tshark-interface-port.pl "$4.$6" "$9" 0
+allowed: echo -n '<1-65535>'
diff --git a/templates/show/interfaces/loopback/node.tag/capture/node.def b/templates/show/interfaces/loopback/node.tag/capture/node.def
new file mode 100644
index 0000000..231ea09
--- /dev/null
+++ b/templates/show/interfaces/loopback/node.tag/capture/node.def
@@ -0,0 +1,2 @@
+help: Show captured traffic on loopback interface
+run: /opt/vyatta/bin/vyatta-tshark-interface-port.pl "$4"
diff --git a/templates/show/interfaces/loopback/node.tag/capture/not/node.def b/templates/show/interfaces/loopback/node.tag/capture/not/node.def
new file mode 100644
index 0000000..b5bd2e6
--- /dev/null
+++ b/templates/show/interfaces/loopback/node.tag/capture/not/node.def
@@ -0,0 +1 @@
+help: Show captured traffic excluding loopback interface port
diff --git a/templates/show/interfaces/loopback/node.tag/capture/not/port/node.def b/templates/show/interfaces/loopback/node.tag/capture/not/port/node.def
new file mode 100644
index 0000000..b5bd2e6
--- /dev/null
+++ b/templates/show/interfaces/loopback/node.tag/capture/not/port/node.def
@@ -0,0 +1 @@
+help: Show captured traffic excluding loopback interface port
diff --git a/templates/show/interfaces/loopback/node.tag/capture/not/port/node.tag/node.def b/templates/show/interfaces/loopback/node.tag/capture/not/port/node.tag/node.def
new file mode 100644
index 0000000..b8d8ff2
--- /dev/null
+++ b/templates/show/interfaces/loopback/node.tag/capture/not/port/node.tag/node.def
@@ -0,0 +1,3 @@
+help: Show captured traffic excluding loopback interface port
+run: /opt/vyatta/bin/vyatta-tshark-interface-port.pl "$4" "$8" 1
+allowed: echo -n '<1-65535>'
diff --git a/templates/show/interfaces/loopback/node.tag/capture/port/node.def b/templates/show/interfaces/loopback/node.tag/capture/port/node.def
new file mode 100644
index 0000000..e46cf42
--- /dev/null
+++ b/templates/show/interfaces/loopback/node.tag/capture/port/node.def
@@ -0,0 +1 @@
+help: Show captured traffic on loopback interface port
diff --git a/templates/show/interfaces/loopback/node.tag/capture/port/node.tag/node.def b/templates/show/interfaces/loopback/node.tag/capture/port/node.tag/node.def
new file mode 100644
index 0000000..f1aedc4
--- /dev/null
+++ b/templates/show/interfaces/loopback/node.tag/capture/port/node.tag/node.def
@@ -0,0 +1,3 @@
+help: Show captured traffic on specified ethernet interface port
+run: /opt/vyatta/bin/vyatta-tshark-interface-port.pl "$4" "$7" 0
+allowed: echo -n '<1-65535>'
diff --git a/templates/show/interfaces/tunnel/node.tag/capture/node.def b/templates/show/interfaces/tunnel/node.tag/capture/node.def
new file mode 100644
index 0000000..b196a35
--- /dev/null
+++ b/templates/show/interfaces/tunnel/node.tag/capture/node.def
@@ -0,0 +1,2 @@
+help: Show captured traffic on specified tunnel interface
+run: /opt/vyatta/bin/vyatta-tshark-interface-port.pl "$4"
diff --git a/templates/show/interfaces/tunnel/node.tag/capture/not/node.def b/templates/show/interfaces/tunnel/node.tag/capture/not/node.def
new file mode 100644
index 0000000..c957f71
--- /dev/null
+++ b/templates/show/interfaces/tunnel/node.tag/capture/not/node.def
@@ -0,0 +1 @@
+help: Show captured traffic excluding the specified tunnel interface port
diff --git a/templates/show/interfaces/tunnel/node.tag/capture/not/port/node.def b/templates/show/interfaces/tunnel/node.tag/capture/not/port/node.def
new file mode 100644
index 0000000..c957f71
--- /dev/null
+++ b/templates/show/interfaces/tunnel/node.tag/capture/not/port/node.def
@@ -0,0 +1 @@
+help: Show captured traffic excluding the specified tunnel interface port
diff --git a/templates/show/interfaces/tunnel/node.tag/capture/not/port/node.tag/node.def b/templates/show/interfaces/tunnel/node.tag/capture/not/port/node.tag/node.def
new file mode 100644
index 0000000..b5c87c9
--- /dev/null
+++ b/templates/show/interfaces/tunnel/node.tag/capture/not/port/node.tag/node.def
@@ -0,0 +1,3 @@
+help: Show captured traffic excluding the specified tunnel interface port
+run: /opt/vyatta/bin/vyatta-tshark-interface-port.pl "$4" "$8" 1
+allowed: echo -n '<1-65535>'
diff --git a/templates/show/interfaces/tunnel/node.tag/capture/port/node.def b/templates/show/interfaces/tunnel/node.tag/capture/port/node.def
new file mode 100644
index 0000000..ed3b544
--- /dev/null
+++ b/templates/show/interfaces/tunnel/node.tag/capture/port/node.def
@@ -0,0 +1 @@
+help: Show captured traffic on specified tunnel interface port
diff --git a/templates/show/interfaces/tunnel/node.tag/capture/port/node.tag/node.def b/templates/show/interfaces/tunnel/node.tag/capture/port/node.tag/node.def
new file mode 100644
index 0000000..d1f01df
--- /dev/null
+++ b/templates/show/interfaces/tunnel/node.tag/capture/port/node.tag/node.def
@@ -0,0 +1,3 @@
+help: Show captured traffic on specified tunnel interface port
+run: /opt/vyatta/bin/vyatta-tshark-interface-port.pl "$4" "$7" 0
+allowed: echo -n '<1-65535>'
diff --git a/templates/traceroute/node.tag/node.def b/templates/traceroute/node.tag/node.def
index 55acbb7..83a3f31 100644
--- a/templates/traceroute/node.tag/node.def
+++ b/templates/traceroute/node.tag/node.def
@@ -6,9 +6,21 @@ help: Track network path to specified <hostname|IPv4 address>
allowed:
vyatta-allowed-hosts
-run: if /usr/bin/host $2 &>/dev/null
- then
- /usr/bin/traceroute $2
- else
- echo Cannot identify $2
+run:
+ if /opt/vyatta/sbin/vyatta-validate-type.pl -q ipv4 $2
+ then
+ /usr/bin/traceroute $2
+ echo
+ else
+ if cat /etc/resolv.conf | grep -q nameserver
+ then
+ if /usr/bin/host $2 &> /dev/null
+ then
+ /usr/bin/traceroute $2
+ else
+ echo "Invalid IP address or host name '$2'"
+ fi
+ else
+ echo "Either enter a valid IPv4 address or configure Domain Name Server to resolve host names"
+ fi
fi