forked from extern/shorewall_code
Add alternate specification in tunnels file ('gateways')
- Make similar change in tcrules file with 'action' Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
7453b70666
commit
4320150dc4
@ -1471,8 +1471,8 @@ sub supplied( $ ) {
|
||||
sub split_line1( $$;$ ) {
|
||||
my ( $description, $columnsref, $nopad) = @_;
|
||||
|
||||
my @maxcolumns = ( keys %$columnsref );
|
||||
my $maxcolumns = @maxcolumns;
|
||||
my @maxcolumns = ( sort { $a <=> $b } values %$columnsref );
|
||||
my $maxcolumns = ( $maxcolumns[-1] || 0 ) + 1;
|
||||
#
|
||||
# First see if there is a semicolon on the line; what follows will be column/value paris
|
||||
#
|
||||
|
@ -197,11 +197,11 @@ sub process_tc_rule( ) {
|
||||
my ( $originalmark, $source, $dest, $proto, $ports, $sports, $user, $testval, $length, $tos , $connbytes, $helper, $headers, $probability , $dscp );
|
||||
if ( $family == F_IPV4 ) {
|
||||
( $originalmark, $source, $dest, $proto, $ports, $sports, $user, $testval, $length, $tos , $connbytes, $helper, $probability, $dscp ) =
|
||||
split_line1 'tcrules file', { mark => 0, source => 1, dest => 2, proto => 3, dport => 4, sport => 5, user => 6, test => 7, length => 8, tos => 9, connbytes => 10, helper => 11, probability => 12 , dscp => 13 };
|
||||
split_line1 'tcrules file', { mark => 0, action => 0, source => 1, dest => 2, proto => 3, dport => 4, sport => 5, user => 6, test => 7, length => 8, tos => 9, connbytes => 10, helper => 11, probability => 12 , dscp => 13 };
|
||||
$headers = '-';
|
||||
} else {
|
||||
( $originalmark, $source, $dest, $proto, $ports, $sports, $user, $testval, $length, $tos , $connbytes, $helper, $headers, $probability, $dscp ) =
|
||||
split_line1 'tcrules file', { mark => 0, source => 1, dest => 2, proto => 3, dport => 4, sport => 5, user => 6, test => 7, length => 8, tos => 9, connbytes => 10, helper => 11, headers => 12, probability => 13 , dscp => 14 };
|
||||
split_line1 'tcrules file', { mark => 0, action => 0, source => 1, dest => 2, proto => 3, dport => 4, sport => 5, user => 6, test => 7, length => 8, tos => 9, connbytes => 10, helper => 11, headers => 12, probability => 13 , dscp => 14 };
|
||||
}
|
||||
|
||||
our @tccmd;
|
||||
|
@ -292,7 +292,7 @@ sub setup_tunnels() {
|
||||
|
||||
while ( read_a_line( NORMAL_READ ) ) {
|
||||
|
||||
my ( $kind, $zone, $gateway, $gatewayzones ) = split_line1 'tunnels file', { type => 0, zone => 1, gateway => 2, gateway_zone => 3 };
|
||||
my ( $kind, $zone, $gateway, $gatewayzones ) = split_line1 'tunnels file', { type => 0, zone => 1, gateway => 2, gateways => 2, gateway_zone => 3 };
|
||||
|
||||
fatal_error 'TYPE must be specified' if $kind eq '-';
|
||||
fatal_error 'ZONE must be specified' if $zone eq '-';
|
||||
|
Loading…
Reference in New Issue
Block a user