629d2c7118b718c97ac8bb24f4146d7af877a3ae
[packages.git] / net / chrony / patches / 002-ipv6_disabled_fixes.patch
1 --- a/ntp_io.c
2 +++ b/ntp_io.c
3 @@ -355,6 +355,7 @@ read_from_socket(void *anything)
4        }
5  #endif
6  
7 +#ifdef HAVE_IPV6
8  #ifdef IPV6_PKTINFO
9        if (cmsg->cmsg_level == IPPROTO_IPV6 && cmsg->cmsg_type == IPV6_PKTINFO) {
10          struct in6_pktinfo ipi;
11 @@ -365,6 +366,7 @@ read_from_socket(void *anything)
12          remote_addr.local_ip_addr.family = IPADDR_INET6;
13        }
14  #endif
15 +#endif
16  
17  #ifdef SO_TIMESTAMP
18        if (cmsg->cmsg_level == SOL_SOCKET && cmsg->cmsg_type == SO_TIMESTAMP) {
19 @@ -466,6 +468,7 @@ send_packet(void *packet, int packetlen,
20    }
21  #endif
22  
23 +#ifdef HAVE_IPV6
24  #ifdef IPV6_PKTINFO
25    if (remote_addr->local_ip_addr.family == IPADDR_INET6) {
26      struct cmsghdr *cmsg;
27 @@ -484,6 +487,7 @@ send_packet(void *packet, int packetlen,
28          sizeof(ipi->ipi6_addr.s6_addr));
29    }
30  #endif
31 +#endif
32  
33  #if 0
34      LOG(LOGS_INFO, LOGF_NtpIO, "sending to %s:%d from %s",