mirror of
https://gitlab.com/shorewall/code.git
synced 2024-11-23 08:03:11 +01:00
Use correct syntax to create IPv6 ipsets.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
be6b08f835
commit
46d64e39d1
@ -4532,7 +4532,13 @@ sub load_ipsets() {
|
|||||||
|
|
||||||
if ( @ipsets ) {
|
if ( @ipsets ) {
|
||||||
emit ( '' );
|
emit ( '' );
|
||||||
emit ( " qt \$IPSET -L $_ -n || \$IPSET -N $_ iphash" ) for @ipsets;
|
|
||||||
|
if ( $family == F_IPV4 ) {
|
||||||
|
emit ( " qt \$IPSET -L $_ -n || \$IPSET -N $_ iphash" ) for @ipsets;
|
||||||
|
} else {
|
||||||
|
emit ( " qt \$IPSET -L $_ -n || \$IPSET -N $_ hash:ip family ipv6" ) for @ipsets;
|
||||||
|
}
|
||||||
|
|
||||||
emit ( '' );
|
emit ( '' );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4551,7 +4557,11 @@ sub load_ipsets() {
|
|||||||
if ( @ipsets ) {
|
if ( @ipsets ) {
|
||||||
emit '';
|
emit '';
|
||||||
|
|
||||||
emit ( " qt \$IPSET -L $_ -n || \$IPSET -N $_ iphash" ) for @ipsets;
|
if ( $family == F_IPV4 ) {
|
||||||
|
emit ( " qt \$IPSET -L $_ -n || \$IPSET -N $_ iphash" ) for @ipsets;
|
||||||
|
} else {
|
||||||
|
emit ( " qt \$IPSET -L $_ -n || \$IPSET -N $_ hash:ip family ipv6" ) for @ipsets;
|
||||||
|
}
|
||||||
|
|
||||||
emit ( '' ,
|
emit ( '' ,
|
||||||
'elif [ "$COMMAND" = restart ]; then' ,
|
'elif [ "$COMMAND" = restart ]; then' ,
|
||||||
@ -4574,7 +4584,11 @@ sub load_ipsets() {
|
|||||||
' fi',
|
' fi',
|
||||||
'elif [ "$COMMAND" = refresh ]; then' );
|
'elif [ "$COMMAND" = refresh ]; then' );
|
||||||
|
|
||||||
emit ( " qt \$IPSET -L $_ -n || \$IPSET -N $_ iphash" ) for @ipsets;
|
if ( $family == F_IPV4 ) {
|
||||||
|
emit ( " qt \$IPSET -L $_ -n || \$IPSET -N $_ iphash" ) for @ipsets;
|
||||||
|
} else {
|
||||||
|
emit ( " qt \$IPSET -L $_ -n || \$IPSET -N $_ hash:ip family ipv6" ) for @ipsets;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
emit ( 'fi' ,
|
emit ( 'fi' ,
|
||||||
|
Loading…
Reference in New Issue
Block a user