summaryrefslogtreecommitdiff
path: root/package/uhttpd/files
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2011-01-09 23:35:45 +0000
committerJo-Philipp Wich <jow@openwrt.org>2011-01-09 23:35:45 +0000
commitf38a320e693d951e6bcd0fb2ee4e81855d48a21c (patch)
tree35c5a85b50eb565c3b57409ea589d17e053ec2a1 /package/uhttpd/files
parent8067116c10bdf7c34f292ae64c4b6ed6193d3182 (diff)
downloadmtk-20170518-f38a320e693d951e6bcd0fb2ee4e81855d48a21c.zip
mtk-20170518-f38a320e693d951e6bcd0fb2ee4e81855d48a21c.tar.gz
mtk-20170518-f38a320e693d951e6bcd0fb2ee4e81855d48a21c.tar.bz2
uhttpd: protect tcp receive operations with select, make tcp keep-alive optional (#8272)
SVN-Revision: 24952
Diffstat (limited to 'package/uhttpd/files')
-rw-r--r--package/uhttpd/files/uhttpd.config7
-rwxr-xr-xpackage/uhttpd/files/uhttpd.init1
2 files changed, 8 insertions, 0 deletions
diff --git a/package/uhttpd/files/uhttpd.config b/package/uhttpd/files/uhttpd.config
index a29910a..08ca5e5 100644
--- a/package/uhttpd/files/uhttpd.config
+++ b/package/uhttpd/files/uhttpd.config
@@ -51,6 +51,13 @@ config uhttpd main
# request process.
option network_timeout 30
+ # TCP Keep-Alive, send periodic keep-alive probes
+ # over established connections to detect dead peers.
+ # The value is given in seconds to specify the
+ # interval between subsequent probes.
+ # Setting this to 0 will disable TCP keep-alive.
+ option tcp_keepalive 1
+
# Basic auth realm, defaults to local hostname
# option realm OpenWrt
diff --git a/package/uhttpd/files/uhttpd.init b/package/uhttpd/files/uhttpd.init
index f8f1754..069e16f 100755
--- a/package/uhttpd/files/uhttpd.init
+++ b/package/uhttpd/files/uhttpd.init
@@ -66,6 +66,7 @@ start_instance()
append_arg "$cfg" lua_handler "-L"
append_arg "$cfg" script_timeout "-t"
append_arg "$cfg" network_timeout "-T"
+ append_arg "$cfg" tcp_keepalive "-A"
append_arg "$cfg" error_page "-E"
append_arg "$cfg" index_page "-I"