diff options
author | Darren Tucker <dtucker@cvs.openbsd.org> | 2004-10-14 09:35:49 +0000 |
---|---|---|
committer | Darren Tucker <dtucker@cvs.openbsd.org> | 2004-10-14 09:35:49 +0000 |
commit | 96b74c54bf150f0e647296c3003a012c8e3e4672 (patch) | |
tree | 9e916b9d621fe6c2fe6424fb68541015b9e25d04 /usr.sbin/ntpd/client.c | |
parent | 847f96280d44d4c3000df1dffb562acaceb5a588 (diff) |
Have ntpd use IPTOS_LOWDELAY; ok henning@
Diffstat (limited to 'usr.sbin/ntpd/client.c')
-rw-r--r-- | usr.sbin/ntpd/client.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/usr.sbin/ntpd/client.c b/usr.sbin/ntpd/client.c index 230b3d7cf39..100e5de840c 100644 --- a/usr.sbin/ntpd/client.c +++ b/usr.sbin/ntpd/client.c @@ -1,4 +1,4 @@ -/* $OpenBSD: client.c,v 1.40 2004/10/13 13:35:19 henning Exp $ */ +/* $OpenBSD: client.c,v 1.41 2004/10/14 09:35:48 dtucker Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -112,6 +112,8 @@ client_nextaddr(struct ntp_peer *p) int client_query(struct ntp_peer *p) { + int tos = IPTOS_LOWDELAY; + if (p->addr == NULL && client_nextaddr(p) == -1) { set_next(p, INTERVAL_QUERY_PATHETIC); return (-1); @@ -131,6 +133,9 @@ client_query(struct ntp_peer *p) } else fatal("client_query connect"); } + if (setsockopt(p->query->fd, IPPROTO_IP, IP_TOS, &tos, + sizeof(tos)) == -1) + log_warn("setsockopt IPTOS_LOWDELAY"); } /* |