aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorcy <cy@FreeBSD.org>2010-06-08 04:02:30 +0800
committercy <cy@FreeBSD.org>2010-06-08 04:02:30 +0800
commite8e29dd0ee53880cffa9d7d9086092f90f0d173a (patch)
tree147ef67507aa3f0993d3313c54729982712cf47d /net
parent6b4f264a6893218260e61a4c52564cdaa3421498 (diff)
downloadfreebsd-ports-gnome-e8e29dd0ee53880cffa9d7d9086092f90f0d173a.tar.gz
freebsd-ports-gnome-e8e29dd0ee53880cffa9d7d9086092f90f0d173a.tar.zst
freebsd-ports-gnome-e8e29dd0ee53880cffa9d7d9086092f90f0d173a.zip
Patch for NTP bugzilla id 1080.
Submitted by: Nick Sayer <nsayer@kfu.com>`
Diffstat (limited to 'net')
-rw-r--r--net/ntp/Makefile1
-rw-r--r--net/ntp/files/patch-ntpd-ntp_io.c21
2 files changed, 22 insertions, 0 deletions
diff --git a/net/ntp/Makefile b/net/ntp/Makefile
index e8aca71fdfea..d86b964cd519 100644
--- a/net/ntp/Makefile
+++ b/net/ntp/Makefile
@@ -7,6 +7,7 @@
PORTNAME= ntp
PORTVERSION?= 4.2.6p1.r5
+PORTREVISION= 1
CATEGORIES= net ipv6
MASTER_SITES= ftp://ftp.udel.edu/pub/ntp/ntp4/ \
http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ \
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..cdf1eada580f
--- /dev/null
+++ b/net/ntp/files/patch-ntpd-ntp_io.c
@@ -0,0 +1,21 @@
+--- ntpd/ntp_io.c.orig 2010-06-03 20:24:51.000000000 -0700
++++ ntpd/ntp_io.c 2010-06-03 20:27:36.000000000 -0700
+@@ -1414,12 +1414,18 @@
+ sockaddr_u *psau
+ )
+ {
++ unsigned char zerobuf[8];
++
+ if (IS_IPV4(psau) && !NSRCADR(psau))
+ return 1;
+
+ #ifdef INCLUDE_IPV6_SUPPORT
+ if (IS_IPV6(psau) && S_ADDR6_EQ(psau, &in6addr_any))
+ return 1;
++ bzero(zerobuf, sizeof(zerobuf));
++ // If the host portion is all 0, then assume it's a router's anycast address.
++ if (IS_IPV6(psau) && memcmp((char*)(&((struct sockaddr_in6*)psau)->sin6_addr) + 8, zerobuf, 8) == 0)
++ return 1;
+ #endif
+
+ return 0;