diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/vyatta-show-conntrack.pl | 9 |
1 files changed, 9 insertions, 0 deletions
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 |