forked from extern/shorewall_code
Code changes for a PROBABILITY column in the masq file
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
0db233bf7c
commit
ddb325a662
@ -60,9 +60,9 @@ sub initialize($) {
|
|||||||
#
|
#
|
||||||
# Process a single rule from the the masq file
|
# Process a single rule from the the masq file
|
||||||
#
|
#
|
||||||
sub process_one_masq1( $$$$$$$$$$ )
|
sub process_one_masq1( $$$$$$$$$$$ )
|
||||||
{
|
{
|
||||||
my ($interfacelist, $networks, $addresses, $proto, $ports, $ipsec, $mark, $user, $condition, $origdest ) = @_;
|
my ($interfacelist, $networks, $addresses, $proto, $ports, $ipsec, $mark, $user, $condition, $origdest, $probability ) = @_;
|
||||||
|
|
||||||
my $pre_nat;
|
my $pre_nat;
|
||||||
my $add_snat_aliases = $family == F_IPV4 && $config{ADD_SNAT_ALIASES};
|
my $add_snat_aliases = $family == F_IPV4 && $config{ADD_SNAT_ALIASES};
|
||||||
@ -140,6 +140,7 @@ sub process_one_masq1( $$$$$$$$$$ )
|
|||||||
#
|
#
|
||||||
$baserule .= do_test( $mark, $globals{TC_MASK} ) if $mark ne '-';
|
$baserule .= do_test( $mark, $globals{TC_MASK} ) if $mark ne '-';
|
||||||
$baserule .= do_user( $user ) if $user ne '-';
|
$baserule .= do_user( $user ) if $user ne '-';
|
||||||
|
$baserule .= do_probability( $probability ) if $probability ne '-';
|
||||||
|
|
||||||
for my $fullinterface (split_list $interfacelist, 'interface' ) {
|
for my $fullinterface (split_list $interfacelist, 'interface' ) {
|
||||||
my $rule = '';
|
my $rule = '';
|
||||||
@ -379,7 +380,7 @@ sub process_one_masq( )
|
|||||||
{
|
{
|
||||||
my ($interfacelist, $networks, $addresses, $protos, $ports, $ipsec, $mark, $user, $condition, $origdest ) =
|
my ($interfacelist, $networks, $addresses, $protos, $ports, $ipsec, $mark, $user, $condition, $origdest ) =
|
||||||
split_line2( 'masq file',
|
split_line2( 'masq file',
|
||||||
{ interface => 0, source => 1, address => 2, proto => 3, port => 4, ipsec => 5, mark => 6, user => 7, switch => 8, origdest => 9 },
|
{ interface => 0, source => 1, address => 2, proto => 3, port => 4, ipsec => 5, mark => 6, user => 7, switch => 8, origdest => 9, probability => 10 },
|
||||||
{}, #Nopad
|
{}, #Nopad
|
||||||
undef, #Columns
|
undef, #Columns
|
||||||
1 ); #Allow inline matches
|
1 ); #Allow inline matches
|
||||||
|
@ -6,6 +6,6 @@
|
|||||||
# The manpage is also online at
|
# The manpage is also online at
|
||||||
# http://www.shorewall.net/manpages/shorewall-masq.html
|
# http://www.shorewall.net/manpages/shorewall-masq.html
|
||||||
#
|
#
|
||||||
################################################################################################################
|
###################################################################################################################################
|
||||||
#INTERFACE:DEST SOURCE ADDRESS PROTO PORT(S) IPSEC MARK USER/ SWITCH ORIGINAL
|
#INTERFACE:DEST SOURCE ADDRESS PROTO PORT(S) IPSEC MARK USER/ SWITCH ORIGINAL PROBABILITY
|
||||||
# GROUP DEST
|
# GROUP DEST
|
||||||
|
Loading…
Reference in New Issue
Block a user