From 2e57e0609b8cc352fb51df0b0e05309d1cf9589d Mon Sep 17 00:00:00 2001 From: Piotr Sikora Date: Thu, 30 Jan 2014 14:58:21 -0800 Subject: Core: handle getsockopt(TCP_FASTOPEN) failures. 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 --- src/os/unix/ngx_errno.h | 1 + src/os/win32/ngx_errno.h | 1 + 2 files changed, 2 insertions(+) (limited to 'src/os') diff --git a/src/os/unix/ngx_errno.h b/src/os/unix/ngx_errno.h index 663e460d9..16cafda31 100644 --- a/src/os/unix/ngx_errno.h +++ b/src/os/unix/ngx_errno.h @@ -34,6 +34,7 @@ typedef int ngx_err_t; #define NGX_ENOSPC ENOSPC #define NGX_EPIPE EPIPE #define NGX_EINPROGRESS EINPROGRESS +#define NGX_ENOPROTOOPT ENOPROTOOPT #define NGX_EOPNOTSUPP EOPNOTSUPP #define NGX_EADDRINUSE EADDRINUSE #define NGX_ECONNABORTED ECONNABORTED diff --git a/src/os/win32/ngx_errno.h b/src/os/win32/ngx_errno.h index b1a7b36e5..fd3214563 100644 --- a/src/os/win32/ngx_errno.h +++ b/src/os/win32/ngx_errno.h @@ -38,6 +38,7 @@ typedef DWORD ngx_err_t; #define NGX_EPIPE EPIPE #define NGX_EAGAIN WSAEWOULDBLOCK #define NGX_EINPROGRESS WSAEINPROGRESS +#define NGX_ENOPROTOOPT WSAENOPROTOOPT #define NGX_EOPNOTSUPP WSAEOPNOTSUPP #define NGX_EADDRINUSE WSAEADDRINUSE #define NGX_ECONNABORTED WSAECONNABORTED -- cgit