mirror of
https://github.com/openvswitch/ovs
synced 2025-08-31 14:25:26 +00:00
stream-ssl: Fix misleading bound address format.
When the SSL code presents the name of the address to which it is bound,
it should include an "ssl:" or "pssl:" prefix instead of "tcp:" or "ptcp:".
Reported-by: meishengxin <meishengxin@huawei.com>
Reported-at: http://openvswitch.org/pipermail/discuss/2015-December/019694.html
Fixes: e731d71bf4
("Add IPv6 support for OpenFlow, OVSDB, NetFlow, and sFlow.")
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Russell Bryant <russell@ovn.org>
This commit is contained in:
@@ -806,7 +806,7 @@ pssl_open(const char *name OVS_UNUSED, char *suffix, struct pstream **pstreamp,
|
||||
}
|
||||
|
||||
port = ss_get_port(&ss);
|
||||
snprintf(bound_name, sizeof bound_name, "ptcp:%"PRIu16":%s",
|
||||
snprintf(bound_name, sizeof bound_name, "pssl:%"PRIu16":%s",
|
||||
port, ss_format_address(&ss, addrbuf, sizeof addrbuf));
|
||||
|
||||
pssl = xmalloc(sizeof *pssl);
|
||||
@@ -856,7 +856,7 @@ pssl_accept(struct pstream *pstream, struct stream **new_streamp)
|
||||
return error;
|
||||
}
|
||||
|
||||
snprintf(name, sizeof name, "tcp:%s:%"PRIu16,
|
||||
snprintf(name, sizeof name, "ssl:%s:%"PRIu16,
|
||||
ss_format_address(&ss, addrbuf, sizeof addrbuf),
|
||||
ss_get_port(&ss));
|
||||
return new_ssl_stream(name, new_fd, SERVER, STATE_SSL_CONNECTING,
|
||||
|
Reference in New Issue
Block a user