From d21d39f03385c42918946f77398f7fdeb7ae12dd Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Sun, 10 Nov 2013 16:07:32 +0000 Subject: [PATCH] Do not listen on SOCK_DGRAM sockets. --- src/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)); } -- 2.39.5