diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2004-07-09 10:53:34 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2004-07-09 10:53:34 +0000 |
commit | 0264908561a9c56a148e053b0464128aa89d627a (patch) | |
tree | 73c76a62a551ba9de494792fd6ded471164dec4e /usr.sbin/ntpd/ntpd.h | |
parent | 9d2a564965b2248467a5330aff3bcc4700d44f0d (diff) |
rework dns handling with all its cosequences...
we know have both a "server" and "servers" keyword. they differ when the
hostname resolves to more than one IP, server picks one and servers expands
to all.
that means no longer stuffing a sockaddr_storage into ntp_peer but a pointer
to a linked list of ntp_addr structs.
in the "servers" case the list of n addresses returned by host() is expanded
into n ntp_peer structs and thus n individual peers.
in the "server" case the whole list is attached to ntp_peer, and whenever we
do not receive a reply in time we traverse the list one further, so that
hosts with both AAAA and A records are first tried with the AAAA one but
we gracefully fall back to the A one.
semantics with theo; hacked up on the Montreal->Frankfurt flight.
again Air Canada surprised me, that older 767 hat pretty decent seats.
Diffstat (limited to 'usr.sbin/ntpd/ntpd.h')
-rw-r--r-- | usr.sbin/ntpd/ntpd.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.sbin/ntpd/ntpd.h b/usr.sbin/ntpd/ntpd.h index a24a007d3dd..c76d62b06fd 100644 --- a/usr.sbin/ntpd/ntpd.h +++ b/usr.sbin/ntpd/ntpd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ntpd.h,v 1.18 2004/07/08 01:22:57 henning Exp $ */ +/* $OpenBSD: ntpd.h,v 1.19 2004/07/09 10:53:33 henning Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -76,7 +76,8 @@ struct ntp_offset { struct ntp_peer { TAILQ_ENTRY(ntp_peer) entry; - struct sockaddr_storage ss; + struct ntp_addr *addr_head; + struct ntp_addr *addr; struct ntp_query *query; enum client_state state; time_t next; @@ -197,6 +198,7 @@ int server_dispatch(int fd); /* client.c */ int client_peer_init(struct ntp_peer *); +int client_nextaddr(struct ntp_peer *); int client_query(struct ntp_peer *); int client_dispatch(struct ntp_peer *); |