summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2014-05-08 23:37:25 +0200
committerAlex Harpin <development@landsofshadow.co.uk>2015-06-23 22:46:49 +0100
commit9bef238c01ef3d2e80523bf6e6cf97254b2612d6 (patch)
treee6ccd03b1d2241df1612fd25ebfca072e27283bc
parenteeb4865ba10e367f8c6025ef165a4cdc4ba531e6 (diff)
downloadvyatta-conntrack-9bef238c01ef3d2e80523bf6e6cf97254b2612d6.tar.gz
vyatta-conntrack-9bef238c01ef3d2e80523bf6e6cf97254b2612d6.zip
Bug #185: ensure nf_conntrack_netlink is loaded and unloaded properly.
Patch by Kim Hagen.
-rw-r--r--scripts/vyatta-update-conntrack-log.pl3
1 files changed, 3 insertions, 0 deletions
diff --git a/scripts/vyatta-update-conntrack-log.pl b/scripts/vyatta-update-conntrack-log.pl
index 0548762..92e720b 100644
--- a/scripts/vyatta-update-conntrack-log.pl
+++ b/scripts/vyatta-update-conntrack-log.pl
@@ -31,6 +31,7 @@ if ($config->isEmpty()) {
Vyatta::Conntrack::Config::kill_daemon();
# delete the .lock and .log file getting generated
`rm -f $pfile`;
+ `rmmod nf_conntrack_netlink`;
exit 0;
}
@@ -39,9 +40,11 @@ if (defined ($cmd)) {
# First stop the daemon and restart with config
Vyatta::Conntrack::Config::kill_daemon();
`rm -f $pfile`;
+ `modprobe nf_conntrack_netlink`;
system("$cmd");
if ($? >> 8) {
print STDERR "Failed to start conntrack logging daemon";
+ `rmmod nf_conntrack_netlink`;
exit 1;
}
}