diff options
author | Igor Sysoev <igor@sysoev.ru> | 2017-06-28 18:01:00 +0300 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2017-06-28 18:01:00 +0300 |
commit | ec5e540fd7e4c87026c4c94674a7ee758c357d75 (patch) | |
tree | 4a84302aebbd09dfcb5eebc81efad34ede07e87e /src | |
parent | ee381fcca128d8eccf498ef19f68639504b5f4a6 (diff) | |
download | unit-ec5e540fd7e4c87026c4c94674a7ee758c357d75.tar.gz unit-ec5e540fd7e4c87026c4c94674a7ee758c357d75.tar.bz2 |
Fixed building with enabled IPv6 support.
Diffstat (limited to 'src')
-rw-r--r-- | src/nxt_runtime.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nxt_runtime.c b/src/nxt_runtime.c index 4d69ecd0..c707cafd 100644 --- a/src/nxt_runtime.c +++ b/src/nxt_runtime.c @@ -1010,9 +1010,8 @@ nxt_runtime_sockaddr_inet6_parse(nxt_task_t *task, nxt_mp_t *mp, nxt_str_t *addr) { #if (NXT_INET6) - u_char *p, *addr, *addr_end; + u_char *p, *addr_end; size_t length; - nxt_mp_t *mp; nxt_int_t port; nxt_sockaddr_t *sa; struct in6_addr *in6_addr; @@ -1026,8 +1025,8 @@ nxt_runtime_sockaddr_inet6_parse(nxt_task_t *task, nxt_mp_t *mp, goto invalid_address; } - sa = nxt_sockaddr_alloc(mp, sizeof(struct sockaddr_in6)); - + sa = nxt_sockaddr_alloc(mp, sizeof(struct sockaddr_in6), + NXT_INET6_ADDR_STR_LEN); if (nxt_slow_path(sa == NULL)) { return NULL; } @@ -1038,6 +1037,7 @@ nxt_runtime_sockaddr_inet6_parse(nxt_task_t *task, nxt_mp_t *mp, goto invalid_address; } + port = 0; p = addr_end + 1; length = (p + length) - p; |