From 49224ad36f61fcd68f35ba414088fb3f6abf2b5c Mon Sep 17 00:00:00 2001 From: teastep Date: Fri, 1 Apr 2005 22:30:38 +0000 Subject: [PATCH] Correct status output with CONFIG_IP_ADVANCED_ROUTER=n git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@2023 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- Shorewall2/changelog.txt | 2 ++ Shorewall2/releasenotes.txt | 4 ++++ Shorewall2/shorewall | 25 ++++++++++++++++--------- 3 files changed, 22 insertions(+), 9 deletions(-) diff --git a/Shorewall2/changelog.txt b/Shorewall2/changelog.txt index 6ac9e8326..67b3e1d2d 100644 --- a/Shorewall2/changelog.txt +++ b/Shorewall2/changelog.txt @@ -10,6 +10,8 @@ Changes in 2.2.3 5) Add QUEUE policy. +6) Fix routing output when advanced routing support not in kernel. + Changes in 2.2.2 1) The 'check' command disclaimer is toned down further and only diff --git a/Shorewall2/releasenotes.txt b/Shorewall2/releasenotes.txt index 4fb76b19a..bf5597b7e 100755 --- a/Shorewall2/releasenotes.txt +++ b/Shorewall2/releasenotes.txt @@ -7,6 +7,10 @@ Problems corrected in version 2.2.3 :! in the HOSTS column then startup errors occur on "shorewall [re]start". +2) Previously, if "shorewall status" was run on a system whose kernel + lacked advanced routing support (CONFIG_IP_ADVANCED_ROUTER), then + no routing information was displayed. + ----------------------------------------------------------------------- New Features in version 2.2.3 diff --git a/Shorewall2/shorewall b/Shorewall2/shorewall index 3e75a61ea..85079da45 100755 --- a/Shorewall2/shorewall +++ b/Shorewall2/shorewall @@ -1014,17 +1014,24 @@ case "$1" in done done - echo - echo "Routing Rules" - echo - ip rule ls - ip rule ls | while read rule; do - table=${rule##* } + if [ -n "$(ip rule ls)" ]; then echo - echo "Table $table:" + echo "Routing Rules" echo - ip route ls table $table - done + ip rule ls + ip rule ls | while read rule; do + table=${rule##* } + echo + echo "Table $table:" + echo + ip route ls table $table + done + else + echo + echo "Routing Table" + echo + ip route ls + fi echo echo "ARP"