Add undocumented -c option to show and dump

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2011-06-29 11:48:23 -07:00
parent cbeebb6bf8
commit 3e8c1f4e3c
2 changed files with 28 additions and 0 deletions

View File

@ -399,6 +399,11 @@ show_routing() {
heading "Table $table:" heading "Table $table:"
ip route list table $table ip route list table $table
done done
if [ -n "$g_routecache" ]; then
heading "Route Cache"
ip -4 route list cache
fi
else else
heading "Routing Table" heading "Routing Table"
ip route list ip route list
@ -537,6 +542,10 @@ show_command() {
g_ipt_options1="--line-numbers" g_ipt_options1="--line-numbers"
option=${option#l} option=${option#l}
;; ;;
c*)
g_routecache=Yes
option=${option#c}
;;
*) *)
usage 1 usage 1
;; ;;
@ -915,6 +924,10 @@ do_dump_command() {
g_ipt_options1="--line-numbers" g_ipt_options1="--line-numbers"
option=${option#l} option=${option#l}
;; ;;
c*)
g_routecache=Yes
option=${option#c}
;;
*) *)
usage 1 usage 1
;; ;;

View File

@ -391,10 +391,17 @@ show_routing() {
heading "Table $table:" heading "Table $table:"
ip -6 route list table $table ip -6 route list table $table
done done
if [ -n "$g_routecache" ]; then
heading "Route Cache"
ip -6 route list cache
fi
else else
heading "Routing Table" heading "Routing Table"
ip -6 route list ip -6 route list
fi fi
} }
# #
@ -520,6 +527,10 @@ show_command() {
g_ipt_options1="--line-numbers" g_ipt_options1="--line-numbers"
option=${option#l} option=${option#l}
;; ;;
c*)
g_routecache=Yes
option=${option#c}
;;
*) *)
usage 1 usage 1
;; ;;
@ -848,6 +859,10 @@ do_dump_command() {
g_ipt_options1="--line-numbers" g_ipt_options1="--line-numbers"
option=${option#l} option=${option#l}
;; ;;
c*)
g_routecache=Yes
option=${option#c}
;;
*) *)
usage 1 usage 1
;; ;;