Correct splitting of IP(6)TABLES options

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2017-01-07 10:00:37 -08:00
parent b8c322a05f
commit 19ce2093d8
No known key found for this signature in database
GPG Key ID: 96E6B3F2423A4D10
2 changed files with 5 additions and 5 deletions

View File

@ -122,7 +122,7 @@ sub process_conntrack_rule( $$$$$$$$$$ ) {
fatal_error "Invalid conntrack ACTION (IPTABLES)" unless $1;
}
my ( $tgt, $options ) = split( ' ', $2 );
my ( $tgt, $options ) = split( ' ', $2, 2 );
my $target_type = $builtin_target{$tgt};
fatal_error "Unknown target ($tgt)" unless $target_type;
fatal_error "The $tgt TARGET is not allowed in the raw table" unless $target_type & RAW_TABLE;

View File

@ -2893,7 +2893,7 @@ sub process_rule ( $$$$$$$$$$$$$$$$$$$$ ) {
IPTABLES => sub {
if ( $param ) {
fatal_error "Unknown ACTION (IPTABLES)" unless $family == F_IPV4;
my ( $tgt, $options ) = split / /, $param;
my ( $tgt, $options ) = split / /, $param, 2;
my $target_type = $builtin_target{$tgt};
fatal_error "Unknown target ($tgt)" unless $target_type;
fatal_error "The $tgt TARGET is not allowed in the filter table" unless $target_type & FILTER_TABLE;
@ -2906,7 +2906,7 @@ sub process_rule ( $$$$$$$$$$$$$$$$$$$$ ) {
IP6TABLES => sub {
if ( $param ) {
fatal_error "Unknown ACTION (IP6TABLES)" unless $family == F_IPV6;
my ( $tgt, $options ) = split / /, $param;
my ( $tgt, $options ) = split / /, $param, 2;
my $target_type = $builtin_target{$tgt};
fatal_error "Unknown target ($tgt)" unless $target_type;
fatal_error "The $tgt TARGET is not allowed in the filter table" unless $target_type & FILTER_TABLE;
@ -4510,7 +4510,7 @@ sub process_mangle_rule1( $$$$$$$$$$$$$$$$$$$ ) {
maxparams => 1,
function => sub () {
fatal_error "Invalid ACTION (IPTABLES)" unless $family == F_IPV4;
my ( $tgt, $options ) = split( ' ', $params );
my ( $tgt, $options ) = split( ' ', $params, 2 );
my $target_type = $builtin_target{$tgt};
fatal_error "Unknown target ($tgt)" unless $target_type;
fatal_error "The $tgt TARGET is not allowed in the mangle table" unless $target_type & MANGLE_TABLE;
@ -4526,7 +4526,7 @@ sub process_mangle_rule1( $$$$$$$$$$$$$$$$$$$ ) {
maxparams => 1,
function => sub () {
fatal_error "Invalid ACTION (IP6TABLES)" unless $family == F_IPV6;
my ( $tgt, $options ) = split( ' ', $params );
my ( $tgt, $options ) = split( ' ', $params, 2 );
my $target_type = $builtin_target{$tgt};
fatal_error "Unknown target ($tgt)" unless $target_type;
fatal_error "The $tgt TARGET is not allowed in the mangle table" unless $target_type & MANGLE_TABLE;