From 7aaa5c08f46203cd6bdf3c9c12e6c9185341c616 Mon Sep 17 00:00:00 2001 From: Gaurav Sinha Date: Thu, 15 Dec 2011 17:13:57 -0800 Subject: Bug 7676: including unstaged changes for 7677 --- scripts/vyatta-show-conntrack.pl | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'scripts') diff --git a/scripts/vyatta-show-conntrack.pl b/scripts/vyatta-show-conntrack.pl index 95c2341..4740450 100755 --- a/scripts/vyatta-show-conntrack.pl +++ b/scripts/vyatta-show-conntrack.pl @@ -23,11 +23,13 @@ # # **** End License **** # + use Getopt::Long; use XML::Simple; use Data::Dumper; use POSIX; use lib "/opt/vyatta/share/perl5"; +use Vyatta::ConntrackUtil; use Vyatta::Misc; use warnings; use strict; @@ -369,4 +371,11 @@ if ($xml2) { $data = $xs->XMLin($xml2); print_xml($data, "", $family); } + +if (!($xml1) and !($xml2)) { + if (!(Vyatta::ConntrackUtil::check_for_conntrack_hooks())) { + #Connection tracking is being used + die "\nWarning: Connection tracking is not enabled\n\n"; + } +} # end of file -- cgit v1.2.3