[Spice-devel] [PATCH] server: don't fail on ENOPROTOOPT from setsockopt

Nahum Shalman nshalman at elys.com
Fri Jul 20 05:38:12 PDT 2012


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.

This time it's reds.c

see also: 20c7323c9efb22c1aae37557814f21cf58c2a322
---
 server/reds.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/server/reds.c b/server/reds.c
index c33c86c..0c6b7ba 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -2525,7 +2525,7 @@ static RedLinkInfo *reds_init_client_connection(int socket)
     }
 
     if (setsockopt(socket, IPPROTO_TCP, TCP_NODELAY, &delay_val, sizeof(delay_val)) == -1) {
-        if (errno != ENOTSUP) {
+        if (errno != ENOTSUP && errno != ENOPROTOOPT) {
             spice_error("setsockopt failed, %s", strerror(errno));
         }
     }
-- 
1.7.7.2



More information about the Spice-devel mailing list