innbind: does IPV6_V6ONLY depend on SO_REUSEADDR?
rra at stanford.edu
Tue Feb 1 21:39:52 UTC 2011
Florian Schlichting <fschlich at CIS.FU-Berlin.DE> writes:
> looking at innbind, I was wondering if it is safe to assume that when
> SO_REUSEADDR is defined, IPV6_V6ONLY will *always* be defined as well?
> Otherwise, a minor change might be useful:
> --- a/backends/innbind.c
> +++ b/backends/innbind.c
> @@ -212,7 +212,7 @@ static void
> create_socket(struct binding *binding, const char *spec)
> int fd;
> -#ifdef SO_REUSEADDR
> +#if defined(SO_REUSEADDR) || defined(IPV6_V6ONLY)
> int flag;
The assumption being made is actually the other way around (if IPV6_V6ONLY
is defined, SO_REUSEADDR will always be defined), which should be safe
since the former is a much newer flag than the latter. However,
regardless, your change is more correct. I'll apply it. Thanks!
Russ Allbery (rra at stanford.edu) <http://www.eyrie.org/~eagle/>
Please send questions to the list rather than mailing me directly.
<http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
More information about the inn-workers