X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Fsocket-util.c;h=12f04321beb9df16b6097f9be3295eec2ff683f8;hb=ca261b65354f522ba43c823221763ca6f4604e2d;hp=219433fb8f4968b0d6260223fe92af6a10c84399;hpb=ca286ba95be3c0815e5f9c4df54dbed7f5e2d4e7;p=openvswitch diff --git a/lib/socket-util.c b/lib/socket-util.c index 219433fb..12f04321 100644 --- a/lib/socket-util.c +++ b/lib/socket-util.c @@ -702,7 +702,7 @@ inet_open_passive(int style, const char *target, int default_port, } /* Listen. */ - if (listen(fd, 10) < 0) { + if (style == SOCK_STREAM && listen(fd, 10) < 0) { error = errno; VLOG_ERR("%s: listen: %s", target, strerror(error)); goto error;