diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2020-09-17 23:15:51 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2020-09-17 23:15:51 +0100 |
commit | 8262bfa73f9067ebb7c6d0e2ea7851b5b2496064 (patch) | |
tree | 57cf33af80fc8ccec986660e9636afc271f22d12 /src/rspamd.c | |
parent | 67a9b24adc7336370776644cc82f8393601229b1 (diff) | |
download | rspamd-8262bfa73f9067ebb7c6d0e2ea7851b5b2496064.tar.gz rspamd-8262bfa73f9067ebb7c6d0e2ea7851b5b2496064.zip |
[Minor] Another try to fix reuseport damage
Diffstat (limited to 'src/rspamd.c')
-rw-r--r-- | src/rspamd.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/rspamd.c b/src/rspamd.c index 6508b4e8c..5e87103eb 100644 --- a/src/rspamd.c +++ b/src/rspamd.c @@ -396,9 +396,7 @@ create_listen_socket (GPtrArray *addrs, guint cnt, GList *result = NULL; gint fd; guint i; - static const int listen_opts = RSPAMD_INET_ADDRESS_LISTEN_ASYNC| - RSPAMD_INET_ADDRESS_LISTEN_REUSEPORT| - RSPAMD_INET_ADDRESS_LISTEN_NOLISTEN; + static const int listen_opts = RSPAMD_INET_ADDRESS_LISTEN_ASYNC; struct rspamd_worker_listen_socket *ls; g_ptr_array_sort (addrs, rspamd_inet_address_compare_ptr); @@ -422,7 +420,7 @@ create_listen_socket (GPtrArray *addrs, guint cnt, if (listen_type & RSPAMD_WORKER_SOCKET_UDP) { fd = rspamd_inet_address_listen (g_ptr_array_index (addrs, i), SOCK_DGRAM, - listen_opts, -1); + listen_opts | RSPAMD_INET_ADDRESS_LISTEN_REUSEPORT, -1); if (fd != -1) { ls = g_malloc0 (sizeof (*ls)); ls->addr = rspamd_inet_address_copy (g_ptr_array_index (addrs, i)); |