Hi, On Fri, Apr 26, 2013 at 08:40:49PM +0200, PiBa-NL wrote: > Hi Willy, > > Sorry for the weird syntax.. I made the text 'bold', but that seams to > have come out differently...
As you can guess, there is no "bold" attribute in source code, so it must necessarily appear differently at some point. > Anyway i hope the 'patch' below is something you can work with.? > As for renaming the CONFIG_HAP_LINUX_TPROXY to something different would > require everyone that on a regular basis builds HAProxy with this > feature to change their build flags.. So i don't think it should be > renamed/removed. Also while adding another flag for clarity purposes, i > don't think it really adds that much ease of use, and would require new > make scripts and several other changes though-out where transparent > proxying is implemented. I think it would not cause real issues, unless people are forcing all CFLAGS, which would be a bit hasardous, but still possible. So I think we'll stick to not changing it. > Ive changed the defines a little more to i think be 'best compatible' > with i think any circumstances.. > > Is this something that you could 'apply'?: Yes, definitely, thank you ! Well, your mailer seems to have wrapped lines, but they're just a few so I can fix that by hand : > --- workoriginal/haproxy-1.5-dev18/include/common/compat.h 2013-04-26 > 19:36:15.000000000 +0000 > +++ work/haproxy-1.5-dev18/include/common/compat.h 2013-04-26 > 20:32:15.000000000 +0000 > @@ -81,7 +81,16 @@ > #endif > > /* On Linux, IP_TRANSPARENT and/or IP_FREEBIND generally require a > kernel patch */ > +/* On FreeBSD, IP_BINDANY is supported from FreeBSD 8 and up */ > #if defined(CONFIG_HAP_LINUX_TPROXY) > + #if defined(BSD) && defined(IP_BINDANY) && defined(IPV6_BINDANY) > + /* FreeBSD defines */ > + #define SOL_IP IPPROTO_IP > + #define SOL_IPV6 IPPROTO_IPV6 > + #define IP_TRANSPARENT IP_BINDANY > + #define IPV6_TRANSPARENT IPV6_BINDANY > + #endif > + > #if !defined(IP_FREEBIND) > #define IP_FREEBIND 15 > #endif /* !IP_FREEBIND */ I'll add a comment in the README about this option being available in FreeBSD 8+ as well. If you could add a small file with your config example, it would be nice, so that people don't ask how to do it all the time on the mailing list. Thanks, Willy