Avoid panic among the user base by suppressing missing table error messages

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2010-03-19 10:10:20 -07:00
parent b22b279bd1
commit 508475d80b
2 changed files with 20 additions and 10 deletions

View File

@ -794,14 +794,20 @@ dump_command() {
heading "Log ($LOGFILE)" heading "Log ($LOGFILE)"
packet_log 20 packet_log 20
heading "NAT Table" if qt $IPTABLES -t nat -L -n; then
$IPTABLES -t nat -L $g_ipt_options heading "NAT Table"
$IPTABLES -t nat -L $g_ipt_options
fi
heading "Mangle Table" if qt $IPTABLES -t mangle -L -n; then
$IPTABLES -t mangle -L $g_ipt_options heading "Mangle Table"
$IPTABLES -t mangle -L $g_ipt_options
fi
heading "Raw Table" if qt $IPTABLES -t raw -L -n; then
$IPTABLES -t raw -L $g_ipt_options heading "Raw Table"
$IPTABLES -t raw -L $g_ipt_options
fi
local count=$(cat /proc/sys/net/netfilter/nf_conntrack_count) local count=$(cat /proc/sys/net/netfilter/nf_conntrack_count)
local max=$(cat /proc/sys/net/netfilter/nf_conntrack_max) local max=$(cat /proc/sys/net/netfilter/nf_conntrack_max)

View File

@ -675,11 +675,15 @@ dump_command() {
heading "Log ($LOGFILE)" heading "Log ($LOGFILE)"
packet_log 20 packet_log 20
heading "Mangle Table" if qt $IP6TABLES -t mangle -L -n; then
$IP6TABLES -t mangle -L $g_ipt_options heading "Mangle Table"
$IP6TABLES -t mangle -L $g_ipt_options
fi
heading "Raw Table" if qt $IP6TABLES -t raw -L -n; then
$IP6TABLES -t raw -L $g_ipt_options heading "Raw Table"
$IP6TABLES -t raw -L $g_ipt_options
fi
local count=$(cat /proc/sys/net/netfilter/nf_conntrack_count) local count=$(cat /proc/sys/net/netfilter/nf_conntrack_count)
local max=$(cat /proc/sys/net/netfilter/nf_conntrack_max) local max=$(cat /proc/sys/net/netfilter/nf_conntrack_max)