mirror of
https://gitlab.com/shorewall/code.git
synced 2024-12-18 20:30:43 +01:00
Compensate for silly RHEL bug
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
99efb518bd
commit
1fd9e5e95c
@ -2235,10 +2235,10 @@ determine_capabilities() {
|
||||
|
||||
if [ -n "$have_ipset" ]; then
|
||||
if qt $g_tool -A $chain -m set --match-set $chain src -j ACCEPT; then
|
||||
qt $g_tool -D $chain -m set --match-set $chain src -j ACCEPT
|
||||
qt $g_tool -F $chain
|
||||
IPSET_MATCH=Yes
|
||||
elif qt $g_tool -A $chain -m set --set $chain src -j ACCEPT; then
|
||||
qt $g_tool -D $chain -m set --set $chain src -j ACCEPT
|
||||
qt $g_tool -F $chain
|
||||
IPSET_MATCH=Yes
|
||||
OLD_IPSET_MATCH=Yes
|
||||
fi
|
||||
@ -2247,10 +2247,10 @@ determine_capabilities() {
|
||||
elif qt ipset -N $chain hash:ip family inet6; then
|
||||
IPSET_V5=Yes
|
||||
if qt $g_tool -A $chain -m set --match-set $chain src -j ACCEPT; then
|
||||
qt $g_tool -D $chain -m set --match-set $chain src -j ACCEPT
|
||||
qt $g_tool -F $chain
|
||||
IPSET_MATCH=Yes
|
||||
elif qt $g_tool -A $chain -m set --set $chain src -j ACCEPT; then
|
||||
qt $g_tool -D $chain -m set --set $chain src -j ACCEPT
|
||||
qt $g_tool -F $chain
|
||||
IPSET_MATCH=Yes
|
||||
OLD_IPSET_MATCH=Yes
|
||||
fi
|
||||
|
@ -3194,7 +3194,7 @@ sub Old_IPSet_Match() {
|
||||
|
||||
if ( qt( "$ipset -N $sillyname iphash" ) ) {
|
||||
if ( qt1( "$iptables -A $sillyname -m set --set $sillyname src -j ACCEPT" ) ) {
|
||||
qt1( "$iptables -D $sillyname -m set --set $sillyname src -j ACCEPT" );
|
||||
qt1( "$iptables -F $sillyname" );
|
||||
$result = $capabilities{IPSET_MATCH} = 1;
|
||||
}
|
||||
|
||||
@ -3217,7 +3217,7 @@ sub IPSet_Match() {
|
||||
|
||||
if ( qt( "$ipset -N $sillyname iphash" ) || qt( "$ipset -N $sillyname hash:ip family $fam") ) {
|
||||
if ( qt1( "$iptables -A $sillyname -m set --match-set $sillyname src -j ACCEPT" ) ) {
|
||||
qt1( "$iptables -D $sillyname -m set --match-set $sillyname src -j ACCEPT" );
|
||||
qt1( "$iptables -F $sillyname" );
|
||||
$result = ! ( $capabilities{OLD_IPSET_MATCH} = 0 );
|
||||
} else {
|
||||
$result = have_capability 'OLD_IPSET_MATCH';
|
||||
|
Loading…
Reference in New Issue
Block a user