From 20c7323c9efb22c1aae37557814f21cf58c2a322 Mon Sep 17 00:00:00 2001 From: Nahum Shalman Date: Mon, 12 Mar 2012 12:32:58 +0100 Subject: server: don't fail on ENOPROTOOPT from setsockopt If we allow listening on arbitrary sockets like unix sockets, we can get ENOPROTOOPT errors from setsockopt calls that set TCP specific options. This should be allowed to happen. --- server/inputs_channel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'server/inputs_channel.c') diff --git a/server/inputs_channel.c b/server/inputs_channel.c index 932ead72..42247613 100644 --- a/server/inputs_channel.c +++ b/server/inputs_channel.c @@ -470,7 +470,7 @@ static int inputs_channel_config_socket(RedChannelClient *rcc) if (setsockopt(stream->socket, IPPROTO_TCP, TCP_NODELAY, &delay_val, sizeof(delay_val)) == -1) { - if (errno != ENOTSUP) { + if (errno != ENOTSUP && errno != ENOPROTOOPT) { red_printf("setsockopt failed, %s", strerror(errno)); return FALSE; } -- cgit