diff options
author | Ben Pfaff <blp@nicira.com> | 2010-01-07 11:12:36 -0800 |
---|---|---|
committer | Ben Pfaff <blp@nicira.com> | 2010-01-07 11:12:36 -0800 |
commit | e1bd3bee5cd7065e019b4b6736918b2fda95fa49 (patch) | |
tree | 68a1ef11189471d4a4c6bc203a2b09fc38361513 /lib/stream-tcp.c | |
parent | 250382a8fc839cb077b2636983a1c1de0d6b0e17 (diff) |
socket-util: Allow binding without a port number in inet_open_passive().
The test-vconn program binds a socket to a nonspecific port number. To
add SSL support to this program, it needs to be able to use SSL, and the
stream library is the easiest way to do that. But the stream library
can't bind to a nonspecific port. This commit adds that feature, by adding
it to the function that the stream SSL library uses as a building block.
Diffstat (limited to 'lib/stream-tcp.c')
-rw-r--r-- | lib/stream-tcp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/stream-tcp.c b/lib/stream-tcp.c index bfcf35c7..94ff74cb 100644 --- a/lib/stream-tcp.c +++ b/lib/stream-tcp.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009 Nicira Networks. + * Copyright (c) 2008, 2009, 2010 Nicira Networks. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -105,7 +105,7 @@ ptcp_open(const char *name UNUSED, char *suffix, struct pstream **pstreamp) { int fd; - fd = inet_open_passive(SOCK_STREAM, suffix, 0); + fd = inet_open_passive(SOCK_STREAM, suffix, -1); if (fd < 0) { return -fd; } else { |