From: "mame (Yusuke Endoh)" Date: 2012-05-03T14:13:52+09:00 Subject: [ruby-core:44841] [ruby-trunk - Feature #6394][Assigned] Support SO_ORIGINAL_DST socket option Issue #6394 has been updated by mame (Yusuke Endoh). Status changed from Open to Assigned Assignee set to akr (Akira Tanaka) ---------------------------------------- Feature #6394: Support SO_ORIGINAL_DST socket option https://bugs.ruby-lang.org/issues/6394#change-26416 Author: rascov (Min-Cheng Chan) Status: Assigned Priority: Normal Assignee: akr (Akira Tanaka) Category: Target version: In Linux, SO_ORIGINAL_DST provides the original packet destination, which is very useful when packet is translated by NAT. In C, this information can be obtained by getsockopt(fd, SOL_IP, SO_ORIGINAL_DST, &remote, &remote_len); However, current Ruby Socket class does not provide this option. Please consider adding this option into Ruby. By the way, I am still working on the patch file. This option is named with SO_ prefix. However it is an IP layer option (SOL_IP). ext/socket/mkconstants.rb seems to generate options according to the option prefix, which goes wrong in this case. -- http://bugs.ruby-lang.org/