forked from extern/shorewall_code
A fix for COPY handling
This commit is contained in:
parent
f904866336
commit
0e6c9abb5b
@ -110,12 +110,12 @@ sub setup_route_marking() {
|
|||||||
my $interface = $providerref->{interface};
|
my $interface = $providerref->{interface};
|
||||||
my $physical = $providerref->{physical};
|
my $physical = $providerref->{physical};
|
||||||
my $mark = $providerref->{mark};
|
my $mark = $providerref->{mark};
|
||||||
my $base = uc chain_base $physical;
|
|
||||||
|
|
||||||
if ( $providerref->{optional} ) {
|
if ( $providerref->{optional} ) {
|
||||||
if ( $providerref->{shared} ) {
|
if ( $providerref->{shared} ) {
|
||||||
add_commands( $chainref, qq(if [ interface_is_usable $physical -a -n "$providerref->{mac}" ]; then) );
|
add_commands( $chainref, qq(if [ interface_is_usable $physical -a -n "$providerref->{mac}" ]; then) );
|
||||||
} else {
|
} else {
|
||||||
|
my $base = uc chain_base $physical;
|
||||||
add_commands( $chainref, qq(if [ -n "\$${base}_IS_USABLE" ]; then) );
|
add_commands( $chainref, qq(if [ -n "\$${base}_IS_USABLE" ]; then) );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -172,7 +172,7 @@ sub copy_and_edit_table( $$$$ ) {
|
|||||||
#
|
#
|
||||||
my $filter = $family == F_IPV6 ? q(sed 's/ via :: / /' | ) : '';
|
my $filter = $family == F_IPV6 ? q(sed 's/ via :: / /' | ) : '';
|
||||||
#
|
#
|
||||||
# Map physical names to logical names in $copy
|
# Map physical names in $copy to logical names
|
||||||
#
|
#
|
||||||
$copy = join( '|' , map( physical_name($_) , split( ',' , $copy ) ) );
|
$copy = join( '|' , map( physical_name($_) , split( ',' , $copy ) ) );
|
||||||
#
|
#
|
||||||
@ -181,7 +181,7 @@ sub copy_and_edit_table( $$$$ ) {
|
|||||||
$copy =~ s/\+/*/;
|
$copy =~ s/\+/*/;
|
||||||
|
|
||||||
if ( $realm ) {
|
if ( $realm ) {
|
||||||
emit ( "\$IP -$family route show table $duplicate | sed -r 's/ realm [[:alnum:]_]+//' | while read net route; do" )
|
emit ( "\$IP -$family route show table $duplicate | sed -r 's/ realm [[:alnum:]]+//' | while read net route; do" )
|
||||||
} else {
|
} else {
|
||||||
emit ( "\$IP -$family route show table $duplicate | ${filter}while read net route; do" )
|
emit ( "\$IP -$family route show table $duplicate | ${filter}while read net route; do" )
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user