Rename 'ipset v4' -> 'ipset v5'

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2011-06-23 06:36:35 -07:00
parent 04d551d8ca
commit de7d95e7ff
4 changed files with 15 additions and 11 deletions

View File

@ -4517,7 +4517,7 @@ sub ensure_ipset( $ ) {
my $set = shift;
if ( $family == F_IPV4 ) {
if ( have_capability 'IPSET_V4' ) {
if ( have_capability 'IPSET_V5' ) {
emit ( " qt \$IPSET -L $set -n || \$IPSET -N $_ hash:ip family inet" );
} else {
emit ( " qt \$IPSET -L $set -n || \$IPSET -N $_ iphash" );

View File

@ -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" );

View File

@ -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

View File

@ -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