mirror of
https://gitlab.com/shorewall/code.git
synced 2024-12-22 06:10:42 +01:00
Include a current time event in /proc/net/xt_recent/
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
f99e20ee19
commit
89f16bdb37
@ -730,6 +730,11 @@ show_nfacct() {
|
||||
}
|
||||
|
||||
show_events() {
|
||||
if [ -f /proc/net/xt_recent/%CURRENTTIME ]; then
|
||||
echo -127.0.0.1 > /proc/net/xt_recent/%CURRENTTIME
|
||||
echo +127.0.0.1 > /proc/net/xt_recent/%CURRENTTIME
|
||||
fi
|
||||
|
||||
if [ $# -gt 0 ]; then
|
||||
for event in $@ ; do
|
||||
if [ -f /proc/net/xt_recent/$event ]; then
|
||||
|
@ -511,7 +511,9 @@ EOF
|
||||
#
|
||||
emit(
|
||||
' run_refreshed_exit',
|
||||
' do_iptables -N shorewall',
|
||||
' do_iptables -N shorewall' );
|
||||
emit ( ' do_iptables -A shorewall -m recent --set --name \%CURRENTTIME' ) if have_capability 'RECENT_MATCH';
|
||||
emit(
|
||||
" set_state Started $config_dir",
|
||||
' [ $0 = ${VARDIR}/firewall ] || cp -f $(my_pathname) ${VARDIR}/firewall',
|
||||
'else',
|
||||
@ -533,6 +535,11 @@ EOF
|
||||
emit<<"EOF";
|
||||
run_start_exit
|
||||
do_iptables -N shorewall
|
||||
EOF
|
||||
|
||||
emit ( ' do_iptables -A shorewall -m recent --set --name \%CURRENTTIME' ) if have_capability 'RECENT_MATCH';
|
||||
|
||||
emit<<"EOF";
|
||||
set_state Started $config_dir
|
||||
my_pathname=\$(my_pathname)
|
||||
[ \$my_pathname = \${VARDIR}/firewall ] || cp -f \$my_pathname \${VARDIR}/firewall
|
||||
|
Loading…
Reference in New Issue
Block a user