summaryrefslogtreecommitdiffhomepage
path: root/src/core/ngx_inet.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2015-03-17Overflow detection in ngx_inet_addr().Ruslan Ermilov1-2/+6
2013-12-06Core: externalized ngx_cmp_sockaddr().Ruslan Ermilov1-0/+73
It's also extended with the "cmp_port" argument to indicate whether ports should be compared as well, or only addresses.
2013-08-05Core: guard use of AI_ADDRCONFIG.Ruslan Ermilov1-0/+2
Some systems (notably NetBSD and OpenBSD) lack AI_ADDRCONFIG support. Reported by Piotr Sikora.
2013-08-05Fixed build with signed socklen_t and unix sockets.Maxim Dounin1-1/+1
This seems to be the case at least under Cygwin, where build was broken by 05ba5bce31e0 (1.5.3). Reported by Kevin Worthington, http://mailman.nginx.org/pipermail/nginx/2013-August/040028.html.
2013-08-05Core: only resolve address families configured on the local system.Ruslan Ermilov1-0/+1
This is done by passing AI_ADDRCONFIG to getaddrinfo(). On Linux, setting net.ipv6.conf.all.disable_ipv6 to 1 will now be respected. On FreeBSD, AI_ADDRCONFIG filtering is currently implemented by attempting to create a datagram socket for the corresponding family, which succeeds even if the system doesn't in fact have any addresses of that family configured. That is, if the system with IPv6 support in the kernel doesn't have IPv6 addresses configured, AI_ADDRCONFIG will filter out IPv6 only inside a jail without IPv6 addresses or with IPv6 disabled.
2013-07-11Core: extended ngx_sock_ntop() with socklen parameter.Vladimir Homutov1-5/+17
On Linux, sockaddr length is required to process unix socket addresses properly due to unnamed sockets (which don't have sun_path set at all) and abstract namespace sockets.
2013-01-10Fixed "proxy_pass" with IP address and no port (ticket #276).Ruslan Ermilov1-10/+4
Upstreams created by "proxy_pass" with IP address and no port were broken in 1.3.10, by not initializing port in u->sockaddr. API change: ngx_parse_url() was modified to always initialize port (in u->sockaddr and in u->port), even for the u->no_resolve case; ngx_http_upstream() and ngx_http_upstream_add() were adopted.
2012-12-22Properly initialize "struct in6_addr" with zeroes.Ruslan Ermilov1-1/+1
2012-12-17Implemented IPv6 support for URLs specified using domain names.Ruslan Ermilov1-29/+210
This includes "debug_connection", upstreams, "proxy_pass", etc. (ticket #92) To preserve compatibility, "listen" specified with a domain name selects the first IPv4 address, if available. If not available, the first IPv6 address will be used (ticket #186).
2012-12-17Fixed URL parsing code.Ruslan Ermilov1-5/+5
The URL parsing code is not expected to initialize port from default port when in "no_resolve" mode. This got broken in r4671 for the case of IPv6 literals.
2012-12-17Simplified URL parsing code.Ruslan Ermilov1-30/+26
Except for the "listen" directive, "*" specified as a hostname is no longer treated specially.
2012-06-04Support for IPv6 literals in proxy_pass and so on.Maxim Dounin1-7/+30
2012-06-01Code reduction (no functional changes).Ruslan Ermilov1-19/+2
2012-05-21Removed historical and now redundant syntax pre-checks in ngx_parse_url().Ruslan Ermilov1-5/+0
2012-04-12Reduced the number of lines of code in ngx_inet_addr().Ruslan Ermilov1-5/+1
2012-04-11Improved readability of the code that produces bitmask from prefix.Ruslan Ermilov1-2/+2
In collaboration with Maxim Dounin.
2012-04-03In ngx_ptocidr(), check that the supplied prefix length is withinRuslan Ermilov1-0/+7
the allowed range.
2012-04-03Fixed spelling in multiline C comments.Ruslan Ermilov1-1/+1
2012-01-18Copyright updated.Maxim Konovalov1-0/+1
2011-10-25Fixed port range checking.Ruslan Ermilov1-3/+3
2011-04-15fix segfault in IPv6 parsing while processing invalid IPv4 address X.YYYY.ZIgor Sysoev1-1/+1
patch by Maxim Dounin
2011-02-17fix u->one_addr handling in ngx_inet_resolve_host()Igor Sysoev1-1/+1
patch by Maxim Dounin
2009-12-07fix double free(), introduced in r3268Igor Sysoev1-1/+0
2009-11-03ngx_ptocidr() supports IPv6Igor Sysoev1-26/+66
2009-11-03make ngx_inet6_ntop() non-staticIgor Sysoev1-4/+1
2009-11-02change ngx_parse_addr() interfaceIgor Sysoev1-22/+13
2009-11-02ngx_parse_addr()Igor Sysoev1-0/+63
2009-11-02rename ngx_peer_addr_t to ngx_addr_tIgor Sysoev1-3/+3
2009-11-02use sin6_addr.s6_addr instead of "(u_char *) & .sin6_addr"Igor Sysoev1-2/+2
2009-11-02replace inet_addr() with ngx_inet_addr()Igor Sysoev1-21/+18
2009-11-02use ngx_inet6_addr()Igor Sysoev1-28/+2
2009-11-02ngx_inet6_addr()Igor Sysoev1-0/+120
2009-10-26http listen unix domain socketsIgor Sysoev1-0/+14
2009-05-18delete unneeded fieldIgor Sysoev1-3/+0
2009-05-07IPv6 for Win32Igor Sysoev1-0/+14
2009-02-24prepare ngx_ptocidr() for IPv6Igor Sysoev1-13/+14
2009-02-21fix upstream port, introduced in r2513Igor Sysoev1-2/+1
2009-02-21a prelimiary IPv6 support, HTTP listenIgor Sysoev1-29/+309
2008-11-11style fix: remove trailing spacesIgor Sysoev1-1/+1
2008-10-24fix case proxy_pass URL is evaluted to http://host?argsIgor Sysoev1-1/+12
2008-10-24fix case when URL has no port, but has ":" in URI part,Igor Sysoev1-1/+5
the bug has been introduced in r2204
2008-08-26fix bugs introduced in r2204Igor Sysoev1-20/+19
2008-08-26*) refactor ngx_parse_inet_url()Igor Sysoev1-120/+95
*) refactor ngx_parse_unix_domain_url() *) delete unused ngx_url_t fields
2008-08-26*) refactor ngx_ptocidr()Igor Sysoev1-18/+23
*) allow address without bitmask *) thus now ngx_http_geo_module accepts addresses without bitmask
2008-08-22split ngx_parse_url()Igor Sysoev1-55/+81
2008-08-21ngx_sock_ntop() takes family from sockaddr, remove duplicate fieldIgor Sysoev1-3/+3
2008-08-21*) remove zero termination in ngx_inet_ntop() and ngx_sock_ntop()Igor Sysoev1-141/+15
*) use ngx_snprintf() in ngx_inet_ntop() and ngx_sock_ntop() as they are called just once per connection *) NGX_INET_ADDRSTRLEN
2008-06-17*) back out r2040Igor Sysoev1-2/+2
*) refactor ngx_palloc() *) introduce ngx_pnalloc() *) additional pool blocks have smaller header
2008-01-22fix building by bcc introduced by r1831Igor Sysoev1-1/+1
2008-01-04change orderIgor Sysoev1-44/+47