diff options
author | Cy Schubert <cy@FreeBSD.org> | 2010-06-07 20:02:30 +0000 |
---|---|---|
committer | Cy Schubert <cy@FreeBSD.org> | 2010-06-07 20:02:30 +0000 |
commit | f9b6cc83f129fde3148336eecc9a4b26a5d424cb (patch) | |
tree | e00446476fab1931d2fecf47c84516361af3fbde /net/ntp/files/patch-ntpd-ntp_io.c | |
parent | Patch for NTP bugzilla id 1080. (diff) |
Patch for NTP bugzilla id 1080.
Submitted by: Nick Sayer <nsayer@kfu.com>`
Notes
Notes:
svn path=/head/; revision=256044
Diffstat (limited to 'net/ntp/files/patch-ntpd-ntp_io.c')
-rw-r--r-- | net/ntp/files/patch-ntpd-ntp_io.c | 21 |
1 files changed, 21 insertions, 0 deletions
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; |