From: Vsevolod Stakhov Date: Sun, 10 Nov 2013 16:07:32 +0000 (+0000) Subject: Do not listen on SOCK_DGRAM sockets. X-Git-Tag: 0.6.0~78 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=d21d39f03385c42918946f77398f7fdeb7ae12dd;p=rspamd.git Do not listen on SOCK_DGRAM sockets. --- diff --git a/src/main.c b/src/main.c index 6c4f0c318..4e62ec768 100644 --- a/src/main.c +++ b/src/main.c @@ -569,7 +569,7 @@ create_listen_socket (const gchar *addr, gint port, gint family, gint listen_typ cur = result; while (cur != NULL) { listen_sock = GPOINTER_TO_INT (cur->data); - if (listen_sock != -1) { + if (listen_sock != -1 && listen_type != SOCK_DGRAM) { if (listen (listen_sock, -1) == -1) { msg_err ("cannot listen on socket. %s", strerror (errno)); }