nfd = ls->fd;
#endif
+#if 0
+ /* This needed merely if we have reuseport for tcp, but for now it is disabled */
/* This means that we have an fd with no listening enabled */
if (nfd != -1) {
if (ls->type == RSPAMD_WORKER_SOCKET_TCP) {
}
}
}
+#endif
return true;
}
strerror (errno));
}
+ ls->fd = -1;
+
cur = g_list_next (cur);
}
}
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);
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));