mirror of
https://gitlab.com/shorewall/code.git
synced 2024-11-29 19:13:39 +01:00
Allow compact IPv6 addresses in IP6TABLES() rules
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
19ce2093d8
commit
cb150f9c09
@ -2001,6 +2001,21 @@ sub find_writable_file($) {
|
||||
"$config_path[0]$filename";
|
||||
}
|
||||
|
||||
#
|
||||
# Determine if a value has been supplied
|
||||
#
|
||||
sub supplied( $ ) {
|
||||
my $val = shift;
|
||||
|
||||
defined $val && $val ne '';
|
||||
}
|
||||
|
||||
sub passed( $ ) {
|
||||
my $val = shift;
|
||||
|
||||
defined $val && $val ne '' && $val ne '-';
|
||||
}
|
||||
|
||||
#
|
||||
# Split a comma-separated list into a Perl array
|
||||
#
|
||||
@ -2059,7 +2074,7 @@ sub split_list1( $$;$ ) {
|
||||
sub split_list2( $$ ) {
|
||||
my ($list, $type ) = @_;
|
||||
|
||||
fatal_error "Invalid $type ($list)" if $list =~ /^:|::/;
|
||||
fatal_error "Invalid $type ($list)" if $list =~ /^:/;
|
||||
|
||||
my @list1 = split /:/, $list;
|
||||
my @list2;
|
||||
@ -2096,6 +2111,7 @@ sub split_list2( $$ ) {
|
||||
fatal_error "Invalid $type ($list)" if $opencount < 0;
|
||||
}
|
||||
} elsif ( $element eq '' ) {
|
||||
fatal_error "Invalid $type ($list)" unless supplied $_;
|
||||
push @list2 , $_;
|
||||
} else {
|
||||
$element = join ':', $element , $_;
|
||||
@ -2261,21 +2277,6 @@ sub split_columns( $ ) {
|
||||
@list2;
|
||||
}
|
||||
|
||||
#
|
||||
# Determine if a value has been supplied
|
||||
#
|
||||
sub supplied( $ ) {
|
||||
my $val = shift;
|
||||
|
||||
defined $val && $val ne '';
|
||||
}
|
||||
|
||||
sub passed( $ ) {
|
||||
my $val = shift;
|
||||
|
||||
defined $val && $val ne '' && $val ne '-';
|
||||
}
|
||||
|
||||
sub clear_comment();
|
||||
|
||||
#
|
||||
|
Loading…
Reference in New Issue
Block a user