From 9fa5e62d4fea213c2e8856c492c558a308f2921e Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Wed, 22 Jun 2011 17:09:23 -0700 Subject: [PATCH] Rename 'ipset v4' -> 'ipset v5' Signed-off-by: Tom Eastep --- Shorewall/Perl/Shorewall/Config.pm | 7 +++++-- Shorewall/lib.cli | 7 ++++--- Shorewall6/lib.cli | 10 +++++----- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/Shorewall/Perl/Shorewall/Config.pm b/Shorewall/Perl/Shorewall/Config.pm index 49140fdbf..56bbc6ec6 100644 --- a/Shorewall/Perl/Shorewall/Config.pm +++ b/Shorewall/Perl/Shorewall/Config.pm @@ -609,7 +609,7 @@ sub initialize( $ ) { OWNER_MATCH => undef, IPSET_MATCH => undef, OLD_IPSET_MATCH => undef, - IPSET_V4 => undef, + IPSET_V5 => undef, CONNMARK => undef, XCONNMARK => undef, CONNMARK_MATCH => undef, @@ -2531,7 +2531,7 @@ sub IPSet_Match() { $result; } -sub IPSET_V4() { +sub IPSET_V5() { my $ipset = $config{IPSET} || 'ipset'; my $result = 0; @@ -2644,6 +2644,7 @@ our %detect_capability = IPRANGE_MATCH => \&IPRange_Match, IPSET_MATCH => \&IPSet_Match, OLD_IPSET_MATCH => \&Old_IPSet_Match, + IPSET_V5 => \&IPSET_V5, KLUDGEFREE => \&Kludgefree, LENGTH_MATCH => \&Length_Match, LOGMARK_TARGET => \&Logmark_Target, @@ -2783,6 +2784,7 @@ sub determine_capabilities() { $capabilities{MANGLE_FORWARD} = detect_capability( 'MANGLE_FORWARD' ); $capabilities{RAW_TABLE} = detect_capability( 'RAW_TABLE' ); $capabilities{IPSET_MATCH} = detect_capability( 'IPSET_MATCH' ); + $capabilities{OLD_IPSET_MATCH} = detect_capability( 'OLD_IPSET_MATCH' ); $capabilities{USEPKTTYPE} = detect_capability( 'USEPKTTYPE' ); $capabilities{ADDRTYPE} = detect_capability( 'ADDRTYPE' ); $capabilities{TCPMSS_MATCH} = detect_capability( 'TCPMSS_MATCH' ); @@ -2799,6 +2801,7 @@ sub determine_capabilities() { $capabilities{MARK_ANYWHERE} = detect_capability( 'MARK_ANYWHERE' ); $capabilities{ACCOUNT_TARGET} = detect_capability( 'ACCOUNT_TARGET' ); $capabilities{AUDIT_TARGET} = detect_capability( 'AUDIT_TARGET' ); + $capabilities{IPSET_V5} = detect_capability( 'IPSET_V5' ); qt1( "$iptables -F $sillyname" ); diff --git a/Shorewall/lib.cli b/Shorewall/lib.cli index f1e7ab05e..1d61a4ac1 100644 --- a/Shorewall/lib.cli +++ b/Shorewall/lib.cli @@ -1672,7 +1672,7 @@ determine_capabilities() { OWNER_MATCH= IPSET_MATCH= OLD_IPSET_MATCH= - IPSET_V4= + IPSET_V5= CONNMARK= XCONNMARK= CONNMARK_MATCH= @@ -1821,7 +1821,7 @@ determine_capabilities() { local have_ipset if qt ipset -N $chain hash:ip family inet; then - IPSET_V4=Yes + IPSET_V5=Yes have_ipset=Yes elif qt ipset -N $chain iphash ; then have_ipset=Yes @@ -1942,7 +1942,7 @@ report_capabilities() { report_capability "Header Match" $HEADER_MATCH report_capability "ACCOUNT Target" $ACCOUNT_TARGET report_capability "AUDIT Target" $AUDIT_TARGET - report_capability "ipset V4" $IPSET_V4 + report_capability "ipset V5" $IPSET_V5 fi [ -n "$PKTTYPE" ] || USEPKTTYPE= @@ -2011,6 +2011,7 @@ report_capabilities1() { report_capability1 HEADER_MATCH report_capability1 ACCOUNT_TARGET report_capability1 AUDIT_TARGET + report_capability1 IPSET_V5 echo CAPVERSION=$SHOREWALL_CAPVERSION echo KERNELVERSION=$KERNELVERSION diff --git a/Shorewall6/lib.cli b/Shorewall6/lib.cli index df2ec4851..3e1216143 100644 --- a/Shorewall6/lib.cli +++ b/Shorewall6/lib.cli @@ -1499,7 +1499,7 @@ determine_capabilities() { OWNER_MATCH= IPSET_MATCH= OLD_IPSET_MATCH= - IPSET_V4= + IPSET_V5= CONNMARK= XCONNMARK= CONNMARK_MATCH= @@ -1535,7 +1535,7 @@ determine_capabilities() { HEADER_MATCH= ACCOUNT_TARGET= AUDIT_TARGET= - IPSET_V4= + IPSET_V5= chain=fooX$$ @@ -1654,7 +1654,7 @@ determine_capabilities() { qt ipset -X $chain # Just in case something went wrong the last time if qt ipset -N $chain hash:ip family inet6; then - IPSET_V4=Yes + IPSET_V5=Yes if qt $IP6TABLES -A $chain -m set --set $chain src -j ACCEPT; then qt $IP6TABLES -D $chain -m set --set $chain src -j ACCEPT IPSET_MATCH=Yes @@ -1767,7 +1767,7 @@ report_capabilities() { report_capability "Header Match" $HEADER_MATCH report_capability "ACCOUNT Target" $ACCOUNT_TARGET report_capability "AUDIT Target" $AUDIT_TARGET - report_capability "IPSET V4" $IPSET_V4 + report_capability "ipset V5" $IPSET_V5 fi [ -n "$PKTTYPE" ] || USEPKTTYPE= @@ -1833,7 +1833,7 @@ report_capabilities1() { report_capability1 HEADER_MATCH report_capability1 ACCOUNT_TARGET report_capability1 AUDIT_TARGET - report_capability1 IPSET_V4 + report_capability1 IPSET_V5 echo CAPVERSION=$SHOREWALL_CAPVERSION echo KERNELVERSION=$KERNELVERSION