Welcome! Log In Create A New Profile

Advanced

Re: How can i get ip and port under forward proxy

Maxim Dounin
June 06, 2013 09:04AM
Hello!

On Wed, Jun 05, 2013 at 09:10:10PM -0400, honwel wrote:

> Ok, code is as follow:

[...]

> ngx_peer_connection_t *pc;
> u_char sa[NGX_SOCKADDRLEN];
> socklen_t len;
> u_char text[NGX_SOCKADDR_STRLEN];
> u_char *p;
> struct sockaddr_in *sin;

[...]

> if (pc->local_socket) {
> if (getsockname(pc->local_socket, (struct sockaddr *) &sa, &len) !=
> -1) {

At this point, len is uninitialized. It is used by getsockname()
as an input paramter though, and specifies the length of
supplied sockaddr structure.

--
Maxim Dounin
http://nginx.org/en/donation.html

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

How can i get ip and port under forward proxy

honwel June 05, 2013 06:26AM

Re: How can i get ip and port under forward proxy

Maxim Dounin June 05, 2013 08:20AM

Re: How can i get ip and port under forward proxy

honwel June 05, 2013 09:10PM

Re: How can i get ip and port under forward proxy

Maxim Dounin June 06, 2013 09:04AM

Re: How can i get ip and port under forward proxy

honwel June 06, 2013 09:29PM

Re: How can i get ip and port under forward proxy

Maxim Dounin June 06, 2013 10:06PM

Re: How can i get ip and port under forward proxy

honwel June 05, 2013 09:37PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 200
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready