diff options
author | Deepti Kulkarni <deepti@vyatta.com> | 2011-12-16 04:19:02 -0800 |
---|---|---|
committer | Deepti Kulkarni <deepti@vyatta.com> | 2011-12-16 04:19:02 -0800 |
commit | bad26964038fbe9d8b904e500c9fc3f90a70a005 (patch) | |
tree | a0ca4f3c4a1b26789b4752228dbb9d97c2949ff7 | |
parent | f0f5874e15f2095bb2935d1b3bf92d321dc7c33f (diff) | |
download | vyatta-conntrack-bad26964038fbe9d8b904e500c9fc3f90a70a005.tar.gz vyatta-conntrack-bad26964038fbe9d8b904e500c9fc3f90a70a005.zip |
Resolved merge errors from Makefile.
Moved ConntrackUtil.pm to Conntrack dir.
Bug fix for 7676 for conntrack logging.
-rw-r--r-- | Makefile.am | 7 | ||||
-rw-r--r-- | lib/Vyatta/Conntrack/ConntrackUtil.pm (renamed from lib/Vyatta/ConntrackUtil.pm) | 2 | ||||
-rw-r--r-- | scripts/vyatta-update-conntrack-log.pl | 9 |
3 files changed, 10 insertions, 8 deletions
diff --git a/Makefile.am b/Makefile.am index 34a92b9..46e3603 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,6 +1,6 @@ cfgdir = $(datadir)/vyatta-cfg/templates opdir = $(datadir)/vyatta-op/templates -share_perl5dir = $(datarootdir)/perl5/Vyatta +share_perl5dir = $(datarootdir)/perl5/Vyatta/Conntrack curverdir = $(sysconfdir)/config-migrate/current modprobedir = /etc/modprobe.d @@ -15,14 +15,13 @@ checkparamsonreboot_SCRIPTS = checkparamsonreboot_SCRIPTS += scripts/check-params-on-reboot.d/conntrack-hash-size share_perl5_DATA = lib/Vyatta/Conntrack/Config.pm +share_perl5_DATA += lib/Vyatta/Conntrack/ConntrackUtil.pm + sbin_SCRIPTS = scripts/vyatta-update-conntrack-log.pl bin_sudo_usersdir = $(bindir)/sudo-users bin_sudo_users_SCRIPTS = scripts/vyatta-show-conntrack.pl bin_sudo_users_SCRIPTS += scripts/vyatta-delete-conntrack.pl - -share_perl5_DATA = lib/Vyatta/ConntrackUtil.pm - curver_DATA = cfg-version/conntrack@1 modprobe_DATA = etc/modprobe.d/vyatta_nf_conntrack.conf diff --git a/lib/Vyatta/ConntrackUtil.pm b/lib/Vyatta/Conntrack/ConntrackUtil.pm index b290486..8f529c2 100644 --- a/lib/Vyatta/ConntrackUtil.pm +++ b/lib/Vyatta/Conntrack/ConntrackUtil.pm @@ -23,7 +23,7 @@ # **** End License **** # -package Vyatta::ConntrackUtil; +package Vyatta::Conntrack::ConntrackUtil; use base qw(Exporter); our @EXPORT = qw(check_for_conntrack_hooks); diff --git a/scripts/vyatta-update-conntrack-log.pl b/scripts/vyatta-update-conntrack-log.pl index 09ee0a5..8d0ec88 100644 --- a/scripts/vyatta-update-conntrack-log.pl +++ b/scripts/vyatta-update-conntrack-log.pl @@ -3,15 +3,20 @@ use strict; use lib "/opt/vyatta/share/perl5"; use Vyatta::Conntrack::Config; +use Vyatta::Conntrack::ConntrackUtil; my $pfile = '/var/run/vyatta/connlogd.lock'; -my $lfile = '/var/run/vyatta/connlogd.log'; my $config = new Vyatta::Conntrack::Config; my $oconfig = new Vyatta::Conntrack::Config; + $config->setup(); $oconfig->setupOrig(); +if (!(Vyatta::Conntrack::ConntrackUtil::check_for_conntrack_hooks())) { + print "Warning: Connection tracking is not enabled\n"; +} + if (!($config->isDifferentFrom($oconfig))) { if ($config->isEmpty()) { print STDERR "Empty Configuration\n"; @@ -26,7 +31,6 @@ if ($config->isEmpty()) { Vyatta::Conntrack::Config::kill_daemon(); # delete the .lock and .log file getting generated `rm -f $pfile`; - `rm -f $lfile`; exit 0; } @@ -35,7 +39,6 @@ if ($cmd) { # First stop the daemon and restart with config Vyatta::Conntrack::Config::kill_daemon(); `rm -f $pfile`; - `rm -f $lfile`; system("$cmd"); if ($? >> 8) { print STDERR "Failed to start conntrack logging daemon"; |