mirror of
https://gitlab.com/shorewall/code.git
synced 2024-11-22 07:33:43 +01:00
Rename 'ipset v4' -> 'ipset v5'
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
04d551d8ca
commit
de7d95e7ff
@ -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" );
|
||||
|
@ -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" );
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user