mirror of
https://github.com/openvswitch/ovs
synced 2025-08-31 06:15:47 +00:00
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.
This commit is contained in:
@@ -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 {
|
||||
|
Reference in New Issue
Block a user