From: phk Date: Sun, 24 Jun 2007 09:40:22 +0000 (+0000) Subject: Use sockaddr_storage also here. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c753a74c802eb7268965eb26c8b862b1f4f9e2a7;p=varnish Use sockaddr_storage also here. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1538 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/bin/varnishd/cache_acceptor.c b/varnish-cache/bin/varnishd/cache_acceptor.c index 5adea9ea..e59418a0 100644 --- a/varnish-cache/bin/varnishd/cache_acceptor.c +++ b/varnish-cache/bin/varnishd/cache_acceptor.c @@ -137,7 +137,8 @@ vca_acct(void *arg) { struct sess *sp; socklen_t l; - struct sockaddr addr[2]; /* XXX: IPv6 hack */ + struct sockaddr_storage addr_s; + struct sockaddr *addr; int i, j; struct pollfd *pfd; struct listen_sock *ls; @@ -178,7 +179,8 @@ vca_acct(void *arg) if (pfd[j].revents == 0) continue; VSL_stats->client_conn++; - l = sizeof addr; + l = sizeof addr_s; + addr = (void*)&addr_s; i = accept(pfd[j].fd, addr, &l); if (i < 0) { if (errno != EAGAIN) {