From ec5e540fd7e4c87026c4c94674a7ee758c357d75 Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Wed, 28 Jun 2017 18:01:00 +0300 Subject: Fixed building with enabled IPv6 support. --- src/nxt_runtime.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/nxt_runtime.c') 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; -- cgit