mirror of
https://gitlab.com/shorewall/code.git
synced 2024-12-31 10:38:55 +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() {
|
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
|
if [ $# -gt 0 ]; then
|
||||||
for event in $@ ; do
|
for event in $@ ; do
|
||||||
if [ -f /proc/net/xt_recent/$event ]; then
|
if [ -f /proc/net/xt_recent/$event ]; then
|
||||||
|
@ -511,7 +511,9 @@ EOF
|
|||||||
#
|
#
|
||||||
emit(
|
emit(
|
||||||
' run_refreshed_exit',
|
' 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",
|
" set_state Started $config_dir",
|
||||||
' [ $0 = ${VARDIR}/firewall ] || cp -f $(my_pathname) ${VARDIR}/firewall',
|
' [ $0 = ${VARDIR}/firewall ] || cp -f $(my_pathname) ${VARDIR}/firewall',
|
||||||
'else',
|
'else',
|
||||||
@ -533,6 +535,11 @@ EOF
|
|||||||
emit<<"EOF";
|
emit<<"EOF";
|
||||||
run_start_exit
|
run_start_exit
|
||||||
do_iptables -N shorewall
|
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
|
set_state Started $config_dir
|
||||||
my_pathname=\$(my_pathname)
|
my_pathname=\$(my_pathname)
|
||||||
[ \$my_pathname = \${VARDIR}/firewall ] || cp -f \$my_pathname \${VARDIR}/firewall
|
[ \$my_pathname = \${VARDIR}/firewall ] || cp -f \$my_pathname \${VARDIR}/firewall
|
||||||
|
Loading…
Reference in New Issue
Block a user