projects
/
platform
/
upstream
/
libwebsockets.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3562e44
)
client: ipv6 reject when lws_getaddrinfo46 failed
author
namowen
<namowen@user.github.invalid.com>
Tue, 25 Jul 2017 09:14:37 +0000
(17:14 +0800)
committer
Andy Green
<andy@warmcat.com>
Tue, 25 Jul 2017 09:14:37 +0000
(17:14 +0800)
https://github.com/warmcat/libwebsockets/issues/978
lib/client-handshake.c
patch
|
blob
|
history
diff --git
a/lib/client-handshake.c
b/lib/client-handshake.c
index
42d1a9b
..
6ae27d2
100644
(file)
--- a/
lib/client-handshake.c
+++ b/
lib/client-handshake.c
@@
-111,6
+111,14
@@
lws_client_connect_2(struct lws *wsi)
#ifdef LWS_USE_IPV6
if (wsi->ipv6) {
+ if (n) {
+ /* lws_getaddrinfo46 failed, there is no usable result */
+ lwsl_notice("%s: lws_getaddrinfo46 failed %d\n",
+ __func__, n);
+ cce = "ipv6 lws_getaddrinfo46 failed";
+ goto oom4;
+ }
+
memset(&sa46, 0, sizeof(sa46));
sa46.sa6.sin6_family = AF_INET6;