aboutsummaryrefslogtreecommitdiff
path: root/src/core/ngx_connection.c
Commit message (Collapse)AuthorAge
...
* Use ngx_socket_errno where appropriate.Piotr Sikora2014-02-03
| | | | Signed-off-by: Piotr Sikora <piotr@cloudflare.com>
* Core: handle getsockopt(TCP_FASTOPEN) failures.Piotr Sikora2014-01-30
| | | | | | | | | | Linux returns EOPNOTSUPP for non-TCP sockets and ENOPROTOOPT for TCP sockets, because getsockopt(TCP_FASTOPEN) is not implemented so far. While there, lower the log level from ALERT to NOTICE to match other getsockopt() failures. Signed-off-by: Piotr Sikora <piotr@cloudflare.com>
* Fixed TCP_DEFER_ACCEPT handling (ticket #353).Maxim Dounin2014-01-28
| | | | | | | | | | | | | | | | | Backed out 05a56ebb084a, as it turns out that kernel can return connections without any delay if syncookies are used. This basically means we can't assume anything about connections returned with deferred accept set. To solve original problem the 05a56ebb084a tried to solve, i.e. to don't wait longer than needed if a connection was accepted after deferred accept timeout, this patch changes a timeout set with setsockopt(TCP_DEFER_ACCEPT) to 1 second, unconditionally. This is believed to be enough for speed improvements, and doesn't imply major changes to timeouts used. Note that before 2.6.32 connections were dropped after a timeout. Though it is believed that 1s is still appropriate for kernels before 2.6.32, as previously tcp_synack_retries controlled the actual timeout and 1s results in more than 1 minute actual timeout by default.
* Fixed the first argument to getsockopt().Ruslan Ermilov2013-12-19
| | | | While here, always initialize the last argument.
* Fixed handling of UNIX-domain sockets.Ruslan Ermilov2013-12-09
| | | | | When evaluating $local_port, $server_port, and $server_addr, UNIX-domain sockets were mistakenly interpreted as IPv4 sockets.
* Core: keep the length of the local sockaddr.Ruslan Ermilov2013-12-09
|
* Added support for TCP_FASTOPEN supported in Linux >= 3.7.1.Mathew Rodley2013-12-03
| | | | | | | | | | | --- auto/unix | 12 ++++++++++++ src/core/ngx_connection.c | 32 ++++++++++++++++++++++++++++++++ src/core/ngx_connection.h | 4 ++++ src/http/ngx_http.c | 4 ++++ src/http/ngx_http_core_module.c | 21 +++++++++++++++++++++ src/http/ngx_http_core_module.h | 3 +++ 6 files changed, 76 insertions(+)
* Core: handling of getsockopt(TCP_DEFER_ACCEPT) failures.Maxim Dounin2013-10-31
| | | | | | Recent Linux versions started to return EOPNOTSUPP to getsockopt() calls on unix sockets, resulting in log pollution on binary upgrade. Such errors are silently ignored now.
* Win32: MinGW GCC compatibility.Maxim Dounin2013-09-04
| | | | | | | | | Several warnings silenced, notably (ngx_socket_t) -1 is now checked on socket operations instead of -1, as ngx_socket_t is unsigned on win32 and gcc complains on comparison. With this patch, it's now possible to compile nginx using mingw gcc, with options we normally compile on win32.
* On DragonFlyBSD, TCP_KEEPIDLE and TCP_KEEPINTVL are in msecs.Ruslan Ermilov2013-07-25
| | | | Based on a patch by Sepherosa Ziehau.
* Style: reuse one int variable in ngx_configure_listening_sockets().Ruslan Ermilov2013-07-25
| | | | No functional changes.
* Core: fixed possible use of an uninitialized variable.Vladimir Homutov2013-07-11
| | | | | | | | The call to ngx_sock_ntop() in ngx_connection_local_sockaddr() might be performed with the uninitialized "len" variable. The fix is to initialize variable to the size of corresponding socket address type. The issue was introduced in commit 05ba5bce31e0.
* Core: extended ngx_sock_ntop() with socklen parameter.Vladimir Homutov2013-07-11
| | | | | | On Linux, sockaddr length is required to process unix socket addresses properly due to unnamed sockets (which don't have sun_path set at all) and abstract namespace sockets.
* Use NGX_FILE_ERROR for handling file operations errors.Valentin Bartenev2013-03-25
| | | | | | | | | | | On Win32 platforms 0 is used to indicate errors in file operations, so comparing against -1 is not portable. This was not much of an issue in patched code, since only ngx_fd_info() test is actually reachable on Win32 and in worst case it might result in bogus error log entry. Patch by Piotr Sikora.
* Status: introduced the "ngx_stat_waiting" counter.Valentin Bartenev2013-03-15
| | | | | | | | | | | And corresponding variable $connections_waiting was added. Previously, waiting connections were counted as the difference between active connections and the sum of reading and writing connections. That made it impossible to count more than one request in one connection as reading or writing (as is the case for SPDY). Also, we no longer count connections in handshake state as waiting.
* Removed c->single_connection flag.Valentin Bartenev2013-03-07
| | | | | | | The c->single_connection was intended to be used as lock mechanism to serialize modifications of request object from several threads working with client and upstream connections. The flag is redundant since threads in nginx have never been used that way.
* Fixed failure to start cache manager and cache loader processesIgor Sysoev2012-11-20
| | | | if there were more than 512 listening sockets in configuration.
* Core: ipv6only is now on by default.Ruslan Ermilov2012-07-30
| | | | | | | | | | There is a general consensus that this change results in better consistency between different operating systems and differently tuned operating systems. Note: this changes the width and meaning of the ipv6only field of the ngx_listening_t structure. 3rd party modules that create their own listening sockets might need fixing.
* Fixed spelling in multiline C comments.Ruslan Ermilov2012-04-03
|
* Whitespace fixes.Maxim Dounin2012-03-05
|
* Copyright updated.Maxim Konovalov2012-01-18
|
* Added the "so_keepalive=" parameter to the "listen" directive.Valentin Bartenev2011-12-05
| | | | | | The "so_keepalive" directive in mail module was deprecated. Thanks to Vsevolod Stakhov for initial work.
* Move SO_ACCEPTFILTER and TCP_DEFER_ACCEPT checks into configure.Maxim Dounin2011-08-21
| | | | | | | NetBSD 5.0+ has SO_ACCEPTFILTER support merged from FreeBSD, and having accept filter check in FreeBSD-specific ngx_freebsd_config.h prevents it from being used on NetBSD. Therefore move the check into configure (and do the same for Linux-specific TCP_DEFER_ACCEPT, just to be in line).
* reuse keepalive connections if there are no free worker connectionsIgor Sysoev2011-04-04
| | | | patch by Maxim Dounin
* listen setfib=XIgor Sysoev2010-07-05
|
* fix IPv6 and Unix domain sockets inheritance while online upgradeIgor Sysoev2010-05-31
|
* chmod unix listen domain socket to 0666Igor Sysoev2009-11-30
|
* add NGX_PROCESS_HELPER process statusIgor Sysoev2009-11-23
|
* allow to inherit unix domain sockets while online upgradeIgor Sysoev2009-11-04
|
* delete unused field c->local_socklenIgor Sysoev2009-11-01
|
* do not unlink unix domain socket file while online upgradeIgor Sysoev2009-10-30
|
* unlink unix domain socket file after testingIgor Sysoev2009-10-30
|
* http listen unix domain socketsIgor Sysoev2009-10-26
|
* low default connection errors level from alert to errorIgor Sysoev2009-09-23
|
* update r2925Igor Sysoev2009-06-07
|
* ngx_connection_local_sockaddr()Igor Sysoev2009-05-18
|
* ngx_create_listening()Igor Sysoev2009-05-05
|
* move listen log copying from ngx_open_listening_sockets()Igor Sysoev2009-05-05
| | | | | | to ngx_configure_listening_sockets(), otherwise listen socket logs have no file after first reload and this caused segfault if debug_connection was used; the bug has been introduced in r2786
* use correct nameIgor Sysoev2009-05-05
|
* use local variableIgor Sysoev2009-05-05
|
* delete ngx_listening_inet_stream_socket()Igor Sysoev2009-05-04
|
* *) refactor error_log processing: listen socket log might inherit built-inIgor Sysoev2009-04-30
| | | | | | error_log with zero level, and r2447, r2466, r2467 were not enough *) remove bogus "stderr" level *) some functions and fields renames
* fix the previous commitIgor Sysoev2009-04-29
|
* Winsock uses ECONNABORTED instead of ECONNRESETIgor Sysoev2009-04-29
|
* Win32 master/workers modelIgor Sysoev2009-04-20
|
* ipv6onlyIgor Sysoev2009-03-13
|
* ignore EINVAL from setsockopt() on SolarisIgor Sysoev2009-03-12
|
* a prelimiary IPv6 support, HTTP listenIgor Sysoev2009-02-21
|
* fix grammarIgor Sysoev2008-09-17
|
* ngx_sock_ntop() takes family from sockaddr, remove duplicate fieldIgor Sysoev2008-08-21
|