[nginx] Core: silenced getsockopt(TCP_FASTOPEN) messages on FreeBSD.

Maxim Dounin mdounin at mdounin.ru
Tue May 22 13:59:07 UTC 2018


details:   http://hg.nginx.org/nginx/rev/66aa2c1e82e6
branches:  
changeset: 7274:66aa2c1e82e6
user:      Maxim Dounin <mdounin at mdounin.ru>
date:      Mon May 21 23:11:27 2018 +0300
description:
Core: silenced getsockopt(TCP_FASTOPEN) messages on FreeBSD.

FreeBSD returns EINVAL when getsockopt(TCP_FASTOPEN) is called on a unix
domain socket, resulting in "getsockopt(TCP_FASTOPEN) ... failed" messages
during binary upgrade when unix domain listen sockets are present in
the configuration.  Added EINVAL to the list of ignored error codes.

diffstat:

 src/core/ngx_connection.c |  4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diffs (14 lines):

diff --git a/src/core/ngx_connection.c b/src/core/ngx_connection.c
--- a/src/core/ngx_connection.c
+++ b/src/core/ngx_connection.c
@@ -305,7 +305,9 @@ ngx_set_inherited_sockets(ngx_cycle_t *c
         {
             err = ngx_socket_errno;
 
-            if (err != NGX_EOPNOTSUPP && err != NGX_ENOPROTOOPT) {
+            if (err != NGX_EOPNOTSUPP && err != NGX_ENOPROTOOPT
+                && err != NGX_EINVAL)
+            {
                 ngx_log_error(NGX_LOG_NOTICE, cycle->log, err,
                               "getsockopt(TCP_FASTOPEN) %V failed, ignored",
                               &ls[i].addr_text);


More information about the nginx-devel mailing list