mirror of
https://gitlab.com/shorewall/code.git
synced 2024-11-21 15:13:10 +01:00
Stop errors when displaying an empty routing table
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
b8581e54fa
commit
1377fc8897
@ -649,9 +649,9 @@ show_routing() {
|
||||
ip -$g_family rule list | find_tables | sort -u | while read table; do
|
||||
heading "Table $table:"
|
||||
if [ $g_family -eq 6 ]; then
|
||||
ip -6 -o route list table $table | grep -vF cache | sort_routes
|
||||
ip -6 -o route list table $table 2>/dev/null | grep -vF cache | sort_routes
|
||||
else
|
||||
ip -4 -o route list table $table | sort_routes
|
||||
ip -4 -o route list table $table 2>/dev/null | sort_routes
|
||||
fi
|
||||
done
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user