From 2dec3a8ecb431ce35184e620c6aaada8db52d746 Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Mon, 30 May 2011 11:39:21 -0700 Subject: [PATCH] Correct handling of AUDIT_TARGET is both cli libraries. Signed-off-by: Tom Eastep --- Shorewall/lib.cli | 5 ++++- Shorewall6/lib.cli | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Shorewall/lib.cli b/Shorewall/lib.cli index d10b600f7..bc8c8da4d 100644 --- a/Shorewall/lib.cli +++ b/Shorewall/lib.cli @@ -1706,6 +1706,7 @@ determine_capabilities() { MARK_ANYWHERE= HEADER_MATCH= ACCOUNT_TARGET= + AUDIT_TARGET= chain=fooX$$ @@ -1845,7 +1846,7 @@ determine_capabilities() { qt $IPTABLES -A $chain -j LOG || LOG_TARGET= qt $IPTABLES -A $chain -j MARK --set-mark 5 && MARK_ANYWHERE=Yes qt $IPTABLES -A $chain -j ACCOUNT --addr 192.168.1.0/29 --tname $chain && ACCOUNT_TARGET=Yes - qt $IPTABLES -A $chain -j AUDIT --type drop && ACCOUNT_TARGET=Yes + qt $IPTABLES -A $chain -j AUDIT --type drop && AUDIT_TARGET=Yes qt $IPTABLES -F $chain qt $IPTABLES -X $chain @@ -1928,6 +1929,7 @@ report_capabilities() { report_capability "Mark in any table" $MARK_ANYWHERE report_capability "Header Match" $HEADER_MATCH report_capability "ACCOUNT Target" $ACCOUNT_TARGET + report_capability "AUDIT Target" $AUDIT_TARGET fi [ -n "$PKTTYPE" ] || USEPKTTYPE= @@ -1995,6 +1997,7 @@ report_capabilities1() { report_capability1 MARK_ANYWHERE report_capability1 HEADER_MATCH report_capability1 ACCOUNT_TARGET + report_capability1 AUDIT_TARGET echo CAPVERSION=$SHOREWALL_CAPVERSION echo KERNELVERSION=$KERNELVERSION diff --git a/Shorewall6/lib.cli b/Shorewall6/lib.cli index 7e076c3a9..747026370 100644 --- a/Shorewall6/lib.cli +++ b/Shorewall6/lib.cli @@ -1345,6 +1345,7 @@ determine_capabilities() { MARK_ANYWHERE= HEADER_MATCH= ACCOUNT_TARGET= + AUDIT_TARGET= chain=fooX$$ @@ -1569,7 +1570,8 @@ report_capabilities() { report_capability "fwmark route mask" $FWMARK_RT_MASK report_capability "Mark in any table" $MARK_ANYWHERE report_capability "Header Match" $HEADER_MATCH - report_capability "ACCOUNT Match" $ACCOUNT_TARGET + report_capability "ACCOUNT Target" $ACCOUNT_TARGET + report_capability "AUDIT Target" $AUDIT_TARGET fi [ -n "$PKTTYPE" ] || USEPKTTYPE= @@ -1634,6 +1636,7 @@ report_capabilities1() { report_capability1 MARK_ANYWHERE report_capability1 HEADER_MATCH report_capability1 ACCOUNT_TARGET + report_capability1 AUDIT_TARGET echo CAPVERSION=$SHOREWALL_CAPVERSION echo KERNELVERSION=$KERNELVERSION