From: Ben Pfaff Date: Sat, 19 Dec 2015 06:09:57 +0000 (-0800) Subject: stream-ssl: Fix misleading bound address format. X-Git-Url: http://git.cascardo.eti.br/?p=cascardo%2Fovs.git;a=commitdiff_plain;h=e7e5001301e75d15391a652417ad1900de7f69ab 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 Reported-at: http://openvswitch.org/pipermail/discuss/2015-December/019694.html Fixes: e731d71bf47b ("Add IPv6 support for OpenFlow, OVSDB, NetFlow, and sFlow.") Signed-off-by: Ben Pfaff Acked-by: Russell Bryant --- diff --git a/AUTHORS b/AUTHORS index 5a3e826d6..e8d17acde 100644 --- a/AUTHORS +++ b/AUTHORS @@ -412,6 +412,7 @@ ankur dwivedi ankurengg2003@gmail.com chen zhang 3zhangchen9211@gmail.com kk yap yapkke@stanford.edu likunyun kunyunli@hotmail.com +meishengxin meishengxin@huawei.com neeraj mehta mehtaneeraj07@gmail.com rahim entezari rahim.entezari@gmail.com 俊 赵 zhaojun12@outlook.com diff --git a/lib/stream-ssl.c b/lib/stream-ssl.c index 0e1c8b5ed..f82c31928 100644 --- a/lib/stream-ssl.c +++ b/lib/stream-ssl.c @@ -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,