mirror of
https://gitlab.com/shorewall/code.git
synced 2025-01-03 12:09:14 +01:00
Make dump work correctly on RHEL5
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
6f777098d7
commit
bf5be7198b
@ -1470,10 +1470,22 @@ do_dump_command() {
|
|||||||
$g_tool -t rawpost -L $g_ipt_options
|
$g_tool -t rawpost -L $g_ipt_options
|
||||||
fi
|
fi
|
||||||
|
|
||||||
local count=$(cat /proc/sys/net/netfilter/nf_conntrack_count)
|
local count
|
||||||
local max=$(cat /proc/sys/net/netfilter/nf_conntrack_max)
|
local max
|
||||||
|
|
||||||
heading "Conntrack Table ($count out of $max)"
|
if [ -f /proc/sys/net/netfilter/nf_conntrack_count ]; then
|
||||||
|
count=$(cat /proc/sys/net/netfilter/nf_conntrack_count)
|
||||||
|
max=$(cat /proc/sys/net/netfilter/nf_conntrack_max)
|
||||||
|
|
||||||
|
heading "Conntrack Table ($count out of $max)"
|
||||||
|
elif [ -f /proc/sys/net/ipv4/netfilter/ip_conntrack_count ]; then
|
||||||
|
count=$(cat /proc/sys/net/ipv4/netfilter/ip_conntrack_count)
|
||||||
|
max=$(cat /proc/sys/net/ipv4/netfilter/ip_conntrack_max)
|
||||||
|
|
||||||
|
heading "Conntrack Table ($count out of $max)"
|
||||||
|
else
|
||||||
|
heading "Conntrack Table"
|
||||||
|
fi
|
||||||
|
|
||||||
if [ $g_family -eq 4 ]; then
|
if [ $g_family -eq 4 ]; then
|
||||||
[ -f /proc/net/ip_conntrack ] && cat /proc/net/ip_conntrack || grep -v '^ipv6' /proc/net/nf_conntrack
|
[ -f /proc/net/ip_conntrack ] && cat /proc/net/ip_conntrack || grep -v '^ipv6' /proc/net/nf_conntrack
|
||||||
|
Loading…
Reference in New Issue
Block a user