On Wed, Dec 29, 2010 at 07:18:15PM -0500, oscaruser@programmer.net wrote:
[second sending of the same message]
OK I see transparent configuration option, but looks only available for Linux. Tried on FreeBSD 7.3 amd64 and FBSD 8.1 amd64, with same result, "local_bind (original port): Can't assign requested address (49)". Apparently v8.1 supports IP_BINDANY (man ip 8), but stunnel may not be using this feature (based on searching the stunnel-4.33 source code).
Okay, what do people think about the attached patch that is based on Jason Helfman's work in a FreeBSD PR, but abstracts the transparent proxying option (and the setsockopt() level, and the option's name) so that it supports *both* the Linux IP_TRANSPARENT implementation and *BSD's IP_BINDANY one, and leaves the door open for others in the future?
I'm about to commit this patch to the FreeBSD port of stunnel in a couple of minutes; of course, it's up to Michal Trojnara to decide whether to integrate it upstream in this or any other shape or form :)
G'luck, Peter