From: Justin Pettit Date: Sat, 31 Aug 2013 00:20:29 +0000 (-0700) Subject: ovsdb: Define official port number. X-Git-Tag: sliver-openvswitch-2.0.90-1~11^2~16 X-Git-Url: http://git.onelab.eu/?p=sliver-openvswitch.git;a=commitdiff_plain;h=efc295d2e6322c9382e3808ba845c6d0ed056ee4 ovsdb: Define official port number. Signed-off-by: Justin Pettit Acked-by: Ben Pfaff --- diff --git a/lib/jsonrpc.c b/lib/jsonrpc.c index b43b04423..cef96a9cc 100644 --- a/lib/jsonrpc.c +++ b/lib/jsonrpc.c @@ -63,7 +63,7 @@ static void jsonrpc_error(struct jsonrpc *, int error); int jsonrpc_stream_open(const char *name, struct stream **streamp, uint8_t dscp) { - return stream_open_with_default_port(name, JSONRPC_TCP_PORT, + return stream_open_with_default_port(name, OVSDB_OLD_PORT, streamp, dscp); } @@ -72,7 +72,7 @@ jsonrpc_stream_open(const char *name, struct stream **streamp, uint8_t dscp) int jsonrpc_pstream_open(const char *name, struct pstream **pstreamp, uint8_t dscp) { - return pstream_open_with_default_port(name, JSONRPC_TCP_PORT, + return pstream_open_with_default_port(name, OVSDB_OLD_PORT, pstreamp, dscp); } diff --git a/lib/jsonrpc.h b/lib/jsonrpc.h index 2c691cf2d..539720027 100644 --- a/lib/jsonrpc.h +++ b/lib/jsonrpc.h @@ -32,11 +32,14 @@ struct stream; /* API for a JSON-RPC stream. */ -/* Default port number. +/* Default port numbers. * - * There is nothing standard about this port number. It is simply what - * we have chosen. */ -#define JSONRPC_TCP_PORT 6632 + * OVSDB_OLD_PORT defines the original port number used by OVS. + * OVSDB_PORT defines the official port number assigned by IANA. By + * default, we still uses OVSDB_OLD_PORT, but we present a warning that + * that will change. */ +#define OVSDB_OLD_PORT 6632 +#define OVSDB_PORT 6640 int jsonrpc_stream_open(const char *name, struct stream **, uint8_t dscp); int jsonrpc_pstream_open(const char *name, struct pstream **, uint8_t dscp); diff --git a/ovsdb/SPECS b/ovsdb/SPECS index 5bdb9741d..5656b9d7f 100644 --- a/ovsdb/SPECS +++ b/ovsdb/SPECS @@ -316,7 +316,9 @@ over HTTP, for these reasons: * The JSON-RPC specification for HTTP transport is incomplete. -We are using TCP port 6632 for the database JSON-RPC connection. +We are currently using TCP port 6632 for the database JSON-RPC +connection, but future versions will switch to using IANA-assigned TCP +port 6640. The database wire protocol consists of the following JSON-RPC methods: diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c index 423da10ff..ec3633c40 100644 --- a/vswitchd/bridge.c +++ b/vswitchd/bridge.c @@ -474,7 +474,7 @@ collect_in_band_managers(const struct ovsrec_open_vswitch *ovs_cfg, struct sockaddr_in *sin = &managers[n_managers]; if (stream_parse_target_with_default_port(target, - JSONRPC_TCP_PORT, + OVSDB_OLD_PORT, sin)) { n_managers++; } diff --git a/vswitchd/vswitch.xml b/vswitchd/vswitch.xml index 5fd5b3b2e..6fed6eb10 100644 --- a/vswitchd/vswitch.xml +++ b/vswitchd/vswitch.xml @@ -3127,39 +3127,55 @@
ssl:ip[:port]

- The specified SSL port (default: 6632) on the host at - the given ip, which must be expressed as an IP address - (not a DNS name). The - column in the table must point to a - valid SSL configuration when this form is used. + The specified SSL port on the host at the given + ip, which must be expressed as an IP address + (not a DNS name). The column in the + table must point to a valid SSL configuration when this + form is used.

- SSL support is an optional feature that is not always built as - part of Open vSwitch. + If port is not specified, it currently defaults + to 6632. In the future, the default will change to 6640, + which is the IANA-defined value. +

+

+ SSL support is an optional feature that is not always + built as part of Open vSwitch.

tcp:ip[:port]
- The specified TCP port (default: 6632) on the host at - the given ip, which must be expressed as an IP address - (not a DNS name). +

+ The specified TCP port on the host at the given + ip, which must be expressed as an IP address + (not a DNS name). +

+

+ If port is not specified, it currently defaults + to 6632. In the future, the default will change to 6640, + which is the IANA-defined value. +

pssl:[port][:ip]

- Listens for SSL connections on the specified TCP port - (default: 6632). Specify 0 for port to have the - kernel automatically choose an available port. If ip, - which must be expressed as an IP address (not a DNS name), is - specified, then connections are restricted to the specified local - IP address. -

-

- The column in the port. Specify 0 for port to have + the kernel automatically choose an available port. If + ip, which must be expressed as an IP address + (not a DNS name), is specified, then connections are + restricted to the specified local IP address. The column in the table must point to a valid SSL configuration when this form is used.

+

+ If port is not specified, it currently defaults + to 6632. In the future, the default will change to 6640, + which is the IANA-defined value. +

SSL support is an optional feature that is not always built as part of Open vSwitch. @@ -3167,11 +3183,19 @@

ptcp:[port][:ip]
- Listens for connections on the specified TCP port - (default: 6632). Specify 0 for port to have the kernel - automatically choose an available port. If ip, which - must be expressed as an IP address (not a DNS name), is specified, - then connections are restricted to the specified local IP address. +

+ Listens for connections on the specified TCP + port. Specify 0 for port to have + the kernel automatically choose an available port. If + ip, which must be expressed as an IP address + (not a DNS name), is specified, then connections are + restricted to the specified local IP address. +

+

+ If port is not specified, it currently defaults + to 6632. In the future, the default will change to 6640, + which is the IANA-defined value. +

When multiple managers are configured, the