1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/ext/socket
akr 2e6b97a45d * ext/socket: Bypass getaddrinfo() if node and serv are numeric.
Reporeted by Naotoshi Seo.  [ruby-core:60801] [Bug #9525]

* ext/socket/extconf.rb: Detect struct sockaddr_in6.sin6_len.

* ext/socket/sockport.h (SET_SIN6_LEN): New macro.
  (INIT_SOCKADDR_IN6): Ditto.

* ext/socket/rubysocket.h (struct rb_addrinfo): Add
  allocated_by_malloc field.

* ext/socket/raddrinfo.c (numeric_getaddrinfo): New function.
  (rb_getaddrinfo): Call numeric_getaddrinfo at first.
  (rb_freeaddrinfo): Free struct addrinfo properly when it is
  allocated by numeric_getaddrinfo.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45047 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-19 10:37:43 +00:00
..
lib * ext/socket/lib/socket.rb: Don't test $! in "ensure" clause because 2013-12-13 16:11:12 +00:00
.document
addrinfo.h
ancdata.c * ext/socket: Avoid redundant fcntl/fstat syscalls for cloexec 2014-01-28 14:37:34 +00:00
basicsocket.c * ext/socket: Avoid unnecessary ppoll/select on Linux. 2014-01-18 14:13:22 +00:00
constants.c
depend
extconf.rb * ext/socket: Bypass getaddrinfo() if node and serv are numeric. 2014-02-19 10:37:43 +00:00
getaddrinfo.c
getnameinfo.c
ifaddr.c * ext/socket/ifaddr.c (rsock_getifaddrs): fix possible memory leak. 2013-10-02 12:41:28 +00:00
init.c socket: split out SOCK_CLOEXEC versions of wrappers for readability 2014-01-31 08:06:19 +00:00
ipsocket.c * ext/socket: Wrap struct addrinfo by struct rb_addrinfo. 2014-02-19 09:38:24 +00:00
mkconstants.rb * ext/socket/mkconstants.rb: define MSG_FASTOPEN. 2013-09-15 15:48:38 +00:00
option.c Several more OS information for TYPE_IP_MULTICAST_LOOP and 2014-01-21 13:39:08 +00:00
raddrinfo.c * ext/socket: Bypass getaddrinfo() if node and serv are numeric. 2014-02-19 10:37:43 +00:00
rubysocket.h * ext/socket: Bypass getaddrinfo() if node and serv are numeric. 2014-02-19 10:37:43 +00:00
socket.c * ext/socket: Wrap struct addrinfo by struct rb_addrinfo. 2014-02-19 09:38:24 +00:00
sockport.h * ext/socket: Bypass getaddrinfo() if node and serv are numeric. 2014-02-19 10:37:43 +00:00
sockssocket.c
tcpserver.c * ext/socket/unixserver.c: [DOC] Document #accept 2013-08-19 16:54:59 +00:00
tcpsocket.c
udpsocket.c * ext/socket: Wrap struct addrinfo by struct rb_addrinfo. 2014-02-19 09:38:24 +00:00
unixserver.c * ext/socket/unixserver.c: [DOC] Document #accept 2013-08-19 16:54:59 +00:00
unixsocket.c * ext/socket: Avoid redundant fcntl/fstat syscalls for cloexec 2014-01-28 14:37:34 +00:00