Welcome! Log In Create A New Profile

Advanced

[PATCH] Core: apply missed options to sockets added during binary upgrade.

Piotr Sikora
October 24, 2013 05:24PM
# HG changeset patch
# User Piotr Sikora <piotr@cloudflare.com>
# Date 1382649517 25200
# Thu Oct 24 14:18:37 2013 -0700
# Node ID d8ee8ef5dcde554bf1d89d61912e6e6f3c5573f2
# Parent e6a1623f87bc96d5ec62b6d77356aa47dbc60756
Core: apply missed options to sockets added during binary upgrade.

The accept_filter and deferred options were not applied to sockets
that were added to configuration during binary upgrade cycle.

Signed-off-by: Piotr Sikora <piotr@cloudflare.com>

diff -r e6a1623f87bc -r d8ee8ef5dcde src/core/ngx_cycle.c
--- a/src/core/ngx_cycle.c Mon Oct 21 18:20:32 2013 +0800
+++ b/src/core/ngx_cycle.c Thu Oct 24 14:18:37 2013 -0700
@@ -545,6 +545,16 @@ ngx_init_cycle(ngx_cycle_t *old_cycle)

if (nls[n].fd == (ngx_socket_t) -1) {
nls[n].open = 1;
+#if (NGX_HAVE_DEFERRED_ACCEPT && defined SO_ACCEPTFILTER)
+ if (nls[n].accept_filter) {
+ nls[n].add_deferred = 1;
+ }
+#endif
+#if (NGX_HAVE_DEFERRED_ACCEPT && defined TCP_DEFER_ACCEPT)
+ if (nls[n].deferred_accept) {
+ nls[n].add_deferred = 1;
+ }
+#endif
}
}

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[PATCH] Core: apply missed options to sockets added during binary upgrade.

Piotr Sikora 697 October 24, 2013 05:24PM

Re: [PATCH] Core: apply missed options to sockets added during binary upgrade.

Maxim Dounin 347 October 30, 2013 08:06PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 204
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready