2
0
mirror of https://github.com/openvswitch/ovs synced 2025-10-29 15:28:56 +00:00

Windows: Local named pipe implementation

Currently in the case of command line arguments punix/unix, on Windows
we create a file, write a TCP port number to connect. This is a security
concern.

This patch adds support for the command line arguments punix/unix trying
to mimic AF_UNIX behind a local named pipe.

This patch drops the TCP socket implementation behind command line
arguments punix/unix and switches to the local named pipe implementation.

Since we do not write anything to the file created by the punix/unix
arguments, switch tests to plain file existence.

Man pages and code comments have been updated.

Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
Acked-by: Paul Boca <pboca@cloudbasesolutions.com>
Signed-off-by: Gurucharan Shetty <guru@ovn.org>
This commit is contained in:
Alin Serdean
2016-08-02 18:19:34 +00:00
committed by Gurucharan Shetty
parent 13a08aa906
commit 922247c684
9 changed files with 601 additions and 130 deletions

View File

@@ -195,7 +195,7 @@ unixctl_command_reply_error(struct unixctl_conn *conn, const char *error)
* - An absolute path (starting with '/') that gives the exact name of
* the Unix domain socket to listen on.
*
* For Windows, a kernel assigned TCP port is used and written in 'path'
* For Windows, a local named pipe is used. A file is created in 'path'
* which may be:
*
* - NULL, in which case <rundir>/<program>.ctl is used.
@@ -442,7 +442,8 @@ unixctl_server_destroy(struct unixctl_server *server)
* be the name of a unixctl server socket. If it does not start with '/', it
* will be prefixed with the rundir (e.g. /usr/local/var/run/openvswitch).
*
* On Windows, connects to a localhost TCP port as written inside 'path'.
* On Windows, connects to a local named pipe. A file which resides in
* 'path' is used to mimic the behavior of a Unix domain socket.
* 'path' should be an absolute path of the file.
*
* Returns 0 if successful, otherwise a positive errno value. If successful,