[pkg-ntp-maintainers] [PATCH] ntp: support IPv6 transport class
Stephen Hemminger
shemminger at vyatta.com
Tue Sep 27 00:02:42 UTC 2011
IPv6 supports transport class in a method analgous to IPv4 TOS
just the option names have changed..
---
ntpd/ntp_io.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/ntpd/ntp_io.c b/ntpd/ntp_io.c
index 7eaa9c0..2ac8089 100644
--- a/ntpd/ntp_io.c
+++ b/ntpd/ntp_io.c
@@ -2751,6 +2751,13 @@ open_socket(
* IPv6 specific options go here
*/
if (IS_IPV6(addr)) {
+#if defined(HAVE_IPTOS_SUPPORT)
+ if (setsockopt(fd, IPPROTO_IPV6, IPV6_TCLASS, (char *)&qos,
+ sizeof(qos)))
+ msyslog(LOG_ERR,
+ "setsockopt IPV6_TCLASS (%02x) fails on address %s: %m",
+ qos, stoa(addr));
+#endif /* HAVE_IPTOS_SUPPORT */
#if defined(IPV6_V6ONLY)
if (isc_net_probe_ipv6only() == ISC_R_SUCCESS
&& setsockopt(fd, IPPROTO_IPV6, IPV6_V6ONLY,
--
1.7.6.3
More information about the pkg-ntp-maintainers
mailing list