diff options
author | cy <cy@FreeBSD.org> | 2014-12-22 14:41:29 +0800 |
---|---|---|
committer | cy <cy@FreeBSD.org> | 2014-12-22 14:41:29 +0800 |
commit | 52e31dee0a7f5ef3be88e07c0d14bf73e38a582d (patch) | |
tree | 92685832efa549f101481c0dfd0b902a9397eb32 /net/ntp | |
parent | 2118f7f2e136c4d0510d87e3cc6ff23892ac0bb4 (diff) | |
download | freebsd-ports-gnome-52e31dee0a7f5ef3be88e07c0d14bf73e38a582d.tar.gz freebsd-ports-gnome-52e31dee0a7f5ef3be88e07c0d14bf73e38a582d.tar.zst freebsd-ports-gnome-52e31dee0a7f5ef3be88e07c0d14bf73e38a582d.zip |
Properly address IPV6 loopback check.
Submitted by: jmg (via twitter)
Diffstat (limited to 'net/ntp')
-rw-r--r-- | net/ntp/Makefile | 5 | ||||
-rw-r--r-- | net/ntp/files/patch-include__ntp_net.h | 28 | ||||
-rw-r--r-- | net/ntp/files/patch-ntpd__ntp_io.c | 22 |
3 files changed, 23 insertions, 32 deletions
diff --git a/net/ntp/Makefile b/net/ntp/Makefile index 87c3bc828d02..0fded93edd79 100644 --- a/net/ntp/Makefile +++ b/net/ntp/Makefile @@ -3,6 +3,7 @@ PORTNAME= ntp PORTVERSION= 4.2.8 +PORTREVISION= 1 CATEGORIES= net ipv6 MASTER_SITES= ftp://ftp.udel.edu/pub/ntp/ntp4/ \ http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ \ @@ -47,10 +48,6 @@ CONFIGURE_ARGS+= --enable-${D} .endif .endfor -.if ${PORT_OPTIONS:MMX4200} -BROKEN= Fails to compile when MX4200 is enabled. -.endif - DOCSDIR= ${PREFIX}/share/doc/${PORTNAME}4 # XXX Temporary hack. Remember to remove this next commit. diff --git a/net/ntp/files/patch-include__ntp_net.h b/net/ntp/files/patch-include__ntp_net.h deleted file mode 100644 index e431baf24eb2..000000000000 --- a/net/ntp/files/patch-include__ntp_net.h +++ /dev/null @@ -1,28 +0,0 @@ ---- include/ntp_net.h.orig 2014-12-19 03:56:52.000000000 -0800 -+++ include/ntp_net.h 2014-12-19 16:21:51.050264459 -0800 -@@ -5,6 +5,11 @@ - #ifndef NTP_NET_H - #define NTP_NET_H - -+/* XXX obtained from /usr/include/netinet6/in6.h */ -+#define s6_addr8 __u6_addr.__u6_addr8 -+#define s6_addr16 __u6_addr.__u6_addr16 -+#define s6_addr32 __u6_addr.__u6_addr32 -+ - #include <sys/types.h> - #ifdef HAVE_SYS_SOCKET_H - #include <sys/socket.h> -@@ -29,6 +34,13 @@ - struct sockaddr sa; - struct sockaddr_in sa4; - struct sockaddr_in6 sa6; -+/* XXX obtained from /usr/include/netinet6/in6.h */ -+ union { -+ uint8_t __u6_addr8[16]; -+ uint16_t __u6_addr16[8]; -+ uint32_t __u6_addr32[4]; -+ } __u6_addr; /* 128-bit IP6 address */ -+ - } sockaddr_u; - - /* diff --git a/net/ntp/files/patch-ntpd__ntp_io.c b/net/ntp/files/patch-ntpd__ntp_io.c new file mode 100644 index 000000000000..cf1486fa9252 --- /dev/null +++ b/net/ntp/files/patch-ntpd__ntp_io.c @@ -0,0 +1,22 @@ +--- ntpd/ntp_io.c.orig 2014-12-19 03:56:55.000000000 -0800 ++++ ntpd/ntp_io.c 2014-12-21 22:36:02.977441698 -0800 +@@ -3454,15 +3454,15 @@ + if (AF_INET6 == itf->family) { + DPRINTF(1, ("Got an IPv6 packet, from <%s> (%d) to <%s> (%d)\n", + stoa(&rb->recv_srcadr), +- IN6_IS_ADDR_LOOPBACK(&rb->recv_srcadr), ++ IN6_IS_ADDR_LOOPBACK(&rb->recv_srcadr.sa6.sin6_addr), + stoa(&itf->sin), +- !IN6_IS_ADDR_LOOPBACK(&itf->sin) ++ !IN6_IS_ADDR_LOOPBACK(&itf->sin.sa6.sin6_addr) + )); + } + + if ( AF_INET6 == itf->family +- && IN6_IS_ADDR_LOOPBACK(&rb->recv_srcadr) +- && !IN6_IS_ADDR_LOOPBACK(&itf->sin) ++ && IN6_IS_ADDR_LOOPBACK(&rb->recv_srcadr.sa6.sin6_addr) ++ && !IN6_IS_ADDR_LOOPBACK(&itf->sin.sa6.sin6_addr) + ) { + packets_dropped++; + DPRINTF(1, ("DROPPING that packet\n")); |