From 108b169d8d178ae0512ec5a942f78685947a61b3 Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Fri, 6 Oct 2017 08:01:52 -0700 Subject: [PATCH] Treat LOG_TARGET like all other capabilities - Previous implementation could generate unworkable script when LOAD_HELPERS_ONLY=Yes Signed-off-by: Tom Eastep --- Shorewall-core/lib.cli | 4 ++-- Shorewall/Perl/Shorewall/Config.pm | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Shorewall-core/lib.cli b/Shorewall-core/lib.cli index 86ad82937..4dbe3eb9e 100644 --- a/Shorewall-core/lib.cli +++ b/Shorewall-core/lib.cli @@ -2770,7 +2770,7 @@ determine_capabilities() { GOTO_TARGET= LOGMARK_TARGET= IPMARK_TARGET= - LOG_TARGET=Yes + LOG_TARGET= ULOG_TARGET= NFLOG_TARGET= PERSISTENT_SNAT= @@ -3138,7 +3138,7 @@ determine_capabilities() { qt $g_tool -A $chain -m time --timestart 23:00 -j DROP && TIME_MATCH=Yes qt $g_tool -A $chain -g $chain1 && GOTO_TARGET=Yes qt $g_tool -A $chain -j LOGMARK && LOGMARK_TARGET=Yes - qt $g_tool -A $chain -j LOG || LOG_TARGET= + qt $g_tool -A $chain -j LOG && LOG_TARGET=Yes qt $g_tool -A $chain -j ULOG && ULOG_TARGET=Yes qt $g_tool -A $chain -j MARK --set-mark 5 && MARK_ANYWHERE=Yes qt $g_tool -A $chain -m statistic --mode nth --every 2 --packet 1 && STATISTIC_MATCH=Yes diff --git a/Shorewall/Perl/Shorewall/Config.pm b/Shorewall/Perl/Shorewall/Config.pm index 9746026a6..6346c7e46 100644 --- a/Shorewall/Perl/Shorewall/Config.pm +++ b/Shorewall/Perl/Shorewall/Config.pm @@ -1010,7 +1010,7 @@ sub initialize( $;$$) { CONNLIMIT_MATCH => undef, TIME_MATCH => undef, GOTO_TARGET => undef, - LOG_TARGET => 1, # Assume that we have it. + LOG_TARGET => undef, ULOG_TARGET => undef, NFLOG_TARGET => undef, LOGMARK_TARGET => undef,