threads / discuss / 3694

git daemon and v6-only

Subject: git daemon and v6-only

## tl;dr

One message between Mar 22, 2006 and Mar 22, 2006.

replies: 0people: 1as markdown or json

Jeff Garzik· Mar 22, 2006, 05:04 UTC · lore
Regarding the following code in daemon.c socksetup():
Show 8 quoted lines
> #ifdef IPV6_V6ONLY
>                 if (ai->ai_family == AF_INET6) {
>                         int on = 1;
>                         setsockopt(sockfd, IPPROTO_IPV6, IPV6_V6ONLY,
>                                    &on, sizeof(on));
>                         /* Note: error is not fatal */
>                 }
> #endif

On Linux this causes you to bind separately to v4 and v6 interfaces, avoiding the default (desired) behavior of using a single socket for both v4 and v6.

	Jeff

← back to recent threads