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:".
This bug was introduced by commit e731d71bf47 (Add IPv6 support for
OpenFlow, OVSDB, NetFlow, and sFlow.).

Reported-by: meishengxin <[email protected]>
Reported-at: http://openvswitch.org/pipermail/discuss/2015-December/019694.html
Signed-off-by: Ben Pfaff <[email protected]>
---
 AUTHORS          | 1 +
 lib/stream-ssl.c | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/AUTHORS b/AUTHORS
index c5c9d51..2043ab7 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -411,6 +411,7 @@ ankur dwivedi           [email protected]
 chen zhang              [email protected]
 kk yap                  [email protected]
 likunyun                [email protected]
+meishengxin             [email protected]
 neeraj mehta            [email protected]
 rahim entezari          [email protected]
 俊 赵                    [email protected]
diff --git a/lib/stream-ssl.c b/lib/stream-ssl.c
index 0e1c8b5..f82c319 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,
-- 
2.1.3

_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev

Reply via email to