Fix martian logging; add /proc to status output

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@1646 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2004-09-24 22:07:08 +00:00
parent 38d54e3fe3
commit d02725a7cb
2 changed files with 22 additions and 5 deletions

View File

@ -5866,6 +5866,7 @@ add_common_rules() {
if [ -n "$ROUTE_FILTER" ]; then
run_and_save_command "echo 1 > /proc/sys/net/ipv4/conf/default/rp_filter"
run_and_save_command "echo 1 > /proc/sys/net/ipv4/conf/all/rp_filter"
fi
run_and_save_command ip route flush cache
@ -5886,7 +5887,7 @@ add_common_rules() {
done
for interface in $interfaces; do
file=/proc/sys/net/ipv4/conf/$interface/log_martians
file/=proc/sys/net/ipv4/conf/$interface/log_martians
if [ -f $file ]; then
run_and_save_command "echo 1 > $file"
else
@ -5895,9 +5896,9 @@ add_common_rules() {
fi
done
if [ -n "$ROUTE_FILTER" ]; then
run_and_save_command "echo 1 > /proc/sys/net/ipv4/conf/default/rp_filter"
run_and_save_command "echo 1 > /proc/sys/net/ipv4/conf/all/rp_filter"
if [ -n "$LOG_MARTIANS" ]; then
run_and_save_command "echo 1 > /proc/sys/net/ipv4/conf/default/log_martians"
run_and_save_command "echo 1 > /proc/sys/net/ipv4/conf/all/log_martians"
fi
fi

View File

@ -619,6 +619,10 @@ show_reset() {
echo
}
show_proc() {
echo " $1 = $(cat $1)"
}
#
# Execution begins here
#
@ -863,7 +867,7 @@ case "$1" in
[ $# -gt 2 ] && usage 1
echo "Shorewall-$version Connections at $HOSTNAME - $(date)"
echo
cat /proc/net/ip_conntrack
cat /pro/net/ip_conntrack
;;
nat)
[ $# -gt 2 ] && usage 1
@ -960,6 +964,18 @@ case "$1" in
brctl show
fi
echo
echo "/proc"
echo
show_proc /proc/sys/net/ipv4/ip_forward
for directory in /proc/sys/net/ipv4/conf/*; do
for file in proxy_arp arp_filter rp_filter; do
show_proc $directory/$file
done
done
echo
echo "Routing Rules"
echo