Problem upgrading on the fly when ipv6 is used

Usu nginx-forum at nginx.us
Mon May 31 11:57:28 MSD 2010


Hello,

thanks for the help, I tried patching the 0.8.38 release but it's giving me an error:

root at localhost:/usr/src/nginx-0.8.38# patch -p1 < ipv6.diff
patching file src/core/ngx_connection.c
Hunk #1 FAILED at 96.
1 out of 1 hunk FAILED -- saving rejects to file src/core/ngx_connection.c.rej

And here's the file generated:

[code]
*************** ngx_set_inherited_sockets(ngx_cycle_t *c
*** 96,109 ****
      ls = cycle->listening.elts;
      for (i = 0; i < cycle->listening.nelts; i++) {

-         /* AF_INET only */
-
-         ls.sockaddr = ngx_palloc(cycle->pool, sizeof(struct sockaddr_in));
          if (ls.sockaddr == NULL) {
              return NGX_ERROR;
          }

-         ls.socklen = sizeof(struct sockaddr_in);
          if (getsockname(ls.fd, ls.sockaddr, &ls.socklen) == -1) {
              ngx_log_error(NGX_LOG_CRIT, cycle->log, ngx_socket_errno,
                            "getsockname() of the inherited "
--- 96,107 ----
      ls = cycle->listening.elts;
      for (i = 0; i < cycle->listening.nelts; i++) {

+         ls.sockaddr = ngx_palloc(cycle->pool, NGX_SOCKADDRLEN);
          if (ls.sockaddr == NULL) {
              return NGX_ERROR;
          }

+         ls.socklen = NGX_SOCKADDRLEN;
          if (getsockname(ls.fd, ls.sockaddr, &ls.socklen) == -1) {
              ngx_log_error(NGX_LOG_CRIT, cycle->log, ngx_socket_errno,
                            "getsockname() of the inherited "
[/code]

Am I doing something wrong?

Thanks,
Andrea

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,91799,92579#msg-92579




More information about the nginx mailing list