aboutsummaryrefslogtreecommitdiffstats
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
commit15fc78d18733eb52a2274073545129fb061ac8e9 (patch)
tree8768880835efa6372f319d6285706a31955a8469 /package/uhttpd/files
parent8176a01da4842638acd8f757a666976e6cdd86f3 (diff)
downloadupstream-15fc78d18733eb52a2274073545129fb061ac8e9.tar.gz
upstream-15fc78d18733eb52a2274073545129fb061ac8e9.tar.bz2
upstream-15fc78d18733eb52a2274073545129fb061ac8e9.zip
[package] uhttpd: protect tcp receive operations with select, make tcp keep-alive optional (#8272)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@24952 3c298f89-4303-0410-b956-a3cf2f4a3e73
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 a29910a65f..08ca5e5e02 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 f8f1754e90..069e16fff1 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"