Valgrind reporting issue in connection->addr_text

bhagavathula nginx-forum at
Tue May 7 11:51:41 UTC 2019


Thanks for the response. We fixed the issue related to casting and still
didnt see any change in behavior where intermittently garbage values are
being appended.
However, when we tried to get the ip address using alternate means, as
follows the issue is not happening and Valgrind is also not reporting any
struct sockaddr_in  *sin = (struct sockaddr_in *)r->connection->sockaddr;
char *ip = apr_palloc(conf->pool, sizeof(char)*INET_ADDRSTRLEN);
inet_ntop(AF_INET, &(sin->sin_addr), ip, INET_ADDRSTRLEN); 

Can you please suggest if there is any issue in earlier approach and using
sockaddr is preferable approach?

Posted at Nginx Forum:,284065,284075#msg-284075

More information about the nginx mailing list