Feature #6394

Support SO_ORIGINAL_DST socket option

Added by Min-Cheng Chan almost 2 years ago. Updated over 1 year ago.

Assignee:Akira Tanaka
Target version:next minor


In Linux, SOORIGINALDST 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, SOLIP, SOORIGINALDST, &remote, &remotelen);
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.


#1 Updated by Yusuke Endoh almost 2 years ago

  • Status changed from Open to Assigned
  • Assignee set to Akira Tanaka

#2 Updated by Yusuke Endoh over 1 year ago

  • Target version set to next minor

Also available in: Atom PDF