Re: [PATCH 00/11] TProxy for IPv6

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Monday 2009-09-14 14:20, Amos Jeffries wrote:
>> assert(socket(PF_INET6, ...) >= 0);
>> assert(setsockopt(fd, SOL_IP, IP_TRANSPARENT, ...) == 0);
>> assert(bind(fd, {::2}) == 0);
>>
>> At least something like that I remember to have used to determine
>> tproxy-2.x ipv4 availability in the days. (I.e. seeing if setsockopt
>> failed.)
>
> Thanks Jan. I gave a variant that a try. It does seem to detect the feature
> support nicely.
>
> However, trying to bind the real IP:port soon after results in "(98) Address
> already in use" even with a shutdown(tmp_sock,...) added to clean up after the
> test.

Odd, since binding to port 0 should give you a random one,
and there are plenty.
Does SO_REUSEADDR help it a bit?
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux