components/ntp/patches/92-in6.patch
changeset 3839 dece34b8bbeb
parent 3838 43d6e6bfc498
child 3840 39959a8e7a76
equal deleted inserted replaced
3838:43d6e6bfc498 3839:dece34b8bbeb
     1 The bug for this issue is NTP community bug 2707. This patch has been
       
     2 submitted to the community. This patch may be removed when NTP is 
       
     3 upgraded to any version that has bug 2702 fixed in it.
       
     4 
       
     5 --- ntpd/ntp_io.c
       
     6 +++ ntpd/ntp_io.c
       
     7 @@ -3450,19 +3450,18 @@ read_network_packet(
       
     8  	*/
       
     9  
       
    10  	// temporary hack...
       
    11 -#ifndef HAVE_SOLARIS_PRIVS
       
    12  	if (AF_INET6 == itf->family) {
       
    13  		DPRINTF(1, ("Got an IPv6 packet, from <%s> (%d) to <%s> (%d)\n",
       
    14  			stoa(&rb->recv_srcadr),
       
    15 -			IN6_IS_ADDR_LOOPBACK(&rb->recv_srcadr),
       
    16 +			IN6_IS_ADDR_LOOPBACK(&rb->recv_srcadr.sa6.sin6_addr),
       
    17  			stoa(&itf->sin),
       
    18 -			!IN6_IS_ADDR_LOOPBACK(&itf->sin)
       
    19 +			!IN6_IS_ADDR_LOOPBACK(&itf->sin.sa6.sin6_addr)
       
    20  			));
       
    21  	}
       
    22  
       
    23  	if (   AF_INET6 == itf->family
       
    24 -	    && IN6_IS_ADDR_LOOPBACK(&rb->recv_srcadr)
       
    25 -	    && !IN6_IS_ADDR_LOOPBACK(&itf->sin)
       
    26 +	    && IN6_IS_ADDR_LOOPBACK(&rb->recv_srcadr.sa6.sin6_addr)
       
    27 +	    && !IN6_IS_ADDR_LOOPBACK(&itf->sin.sa6.sin6_addr)
       
    28  	   ) {
       
    29  		packets_dropped++;
       
    30  		DPRINTF(1, ("DROPPING that packet\n"));
       
    31 @@ -3470,7 +3469,6 @@ read_network_packet(
       
    32  		return buflen;
       
    33  	}
       
    34  	DPRINTF(1, ("processing that packet\n"));
       
    35 -#endif
       
    36  
       
    37  	/*
       
    38  	 * Got one.  Mark how and when it got here,