# git daemon and v6-only

1 messages from 2006-03-22 to 2006-03-22. Participants: Jeff Garzik.
Thread: https://gitlist.dev/t/3694

## Jeff Garzik, 2006-03-22 05:04

Subject: git daemon and v6-only
Message-ID: <4420DAF4.7070406@garzik.org>
URL: https://gitlist.dev/e/4420DAF4.7070406%40garzik.org

```
Regarding the following code in daemon.c socksetup():

> #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

```
