forked from extern/shorewall_code
Use -o when copying routing tables
This commit is contained in:
parent
05e385a748
commit
00add745b7
@ -140,13 +140,13 @@ sub copy_table( $$$ ) {
|
|||||||
my $filter = $family == F_IPV6 ? q(sed 's/ via :: / /' | ) : '';
|
my $filter = $family == F_IPV6 ? q(sed 's/ via :: / /' | ) : '';
|
||||||
|
|
||||||
if ( $realm ) {
|
if ( $realm ) {
|
||||||
emit ( "\$IP -$family route show table $duplicate | sed -r 's/ realm [[:alnum:]_]+//' | while read net route; do" )
|
emit ( "\$IP -$family -o 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 -o route show table $duplicate | ${filter}while read net route; do" )
|
||||||
}
|
}
|
||||||
|
|
||||||
emit ( ' case $net in',
|
emit ( ' case $net in',
|
||||||
' default|nexthop)',
|
' default)',
|
||||||
' ;;',
|
' ;;',
|
||||||
' *)',
|
' *)',
|
||||||
" run_ip route add table $number \$net \$route $realm",
|
" run_ip route add table $number \$net \$route $realm",
|
||||||
@ -172,13 +172,13 @@ 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 -o 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 -o route show table $duplicate | ${filter}while read net route; do" )
|
||||||
}
|
}
|
||||||
|
|
||||||
emit ( ' case $net in',
|
emit ( ' case $net in',
|
||||||
' default|nexthop)',
|
' default)',
|
||||||
' ;;',
|
' ;;',
|
||||||
' *)',
|
' *)',
|
||||||
' case $(find_device $route) in',
|
' case $(find_device $route) in',
|
||||||
|
Loading…
Reference in New Issue
Block a user