[Git][NTPsec/ntpsec][master] And another persistent spelling error: dstadr -> dstaddr.

Eric S. Raymond gitlab at mg.gitlab.com
Sat Dec 5 13:33:35 UTC 2015


Eric S. Raymond pushed to branch master at NTPsec / ntpsec


Commits:
6364b8c8 by Eric S. Raymond at 2015-12-05T08:32:43Z
And another persistent spelling error: dstadr -> dstaddr.

- - - - -


20 changed files:

- devel/ChangeLog
- devel/CommitLog-4.1.0
- docs/includes/ntpq-body.txt
- include/ntp.h
- include/ntpd.h
- include/recvbuff.h
- ntpd/ntp_control.c
- ntpd/ntp_crypto.c
- ntpd/ntp_io.c
- ntpd/ntp_monitor.c
- ntpd/ntp_peer.c
- ntpd/ntp_proto.c
- ntpd/ntp_signd.c
- ntpd/ntp_util.c
- ntpd/ntpsim.c
- ntpd/refclock_parse.c
- ntpq/libntpq.c
- ntpq/ntpq-subs.c
- ntpq/ntpq.c
- tests/perl/ntptrace.t


Changes:

=====================================
devel/ChangeLog
=====================================
--- a/devel/ChangeLog
+++ b/devel/ChangeLog
@@ -1209,7 +1209,7 @@ ntp-4.3 begins.
   sys_residual.
 * [Bug 2087] from 4.2.6p5-RC3: sys_jitter calculation overweights
   sys.peer jitter.
-* from 4.2.6p5-RC3: Ensure NULL peer->dstadr is not accessed in orphan
+* from 4.2.6p5-RC3: Ensure NULL peer->dstaddr is not accessed in orphan
   parent selection.
 (4.2.7p237) 2011/12/01 Released by Harlan Stenn <stenn at ntp.org>
 * [Bug 2050] from 4.2.6p5-RC2: Orphan mode stratum counting to infinity.
@@ -2460,7 +2460,7 @@ No changes from 4.2.6p5-RC3.
 * [Bug 2085] clock_update() sys_rootdisp calculation omits root delay.
 * [Bug 2086] get_systime() should not offset by sys_residual.
 * [Bug 2087] sys_jitter calculation overweights sys.peer jitter.
-* Ensure NULL peer->dstadr is not accessed in orphan parent selection.
+* Ensure NULL peer->dstaddr is not accessed in orphan parent selection.
 
 ---
 (4.2.6p5-RC2) 2011/11/30 Released by Harlan Stenn <stenn at ntp.org>
@@ -3768,7 +3768,7 @@ display both build and runtime OpenSSL versions when they differ.
 * [Bug 850] Fix the wander threshold parameter on the driftfile command.
 * ntp_io.c: Dead code cleanup - Coverity View 19.
 * Leap file related cleanup from Dave Mills.
-* ntp_peer.c: Set peer->srcaddr before (not after) calling set_peerdstadr().
+* ntp_peer.c: Set peer->srcaddr before (not after) calling set_peerdstaddr().
 * Initialize offset in leap_file() - Coverity View 17.
 * Use the correct stratum on KISS codes.
 * Fuzz bits cleanup.


=====================================
devel/CommitLog-4.1.0
=====================================
--- a/devel/CommitLog-4.1.0
+++ b/devel/CommitLog-4.1.0
@@ -1334,7 +1334,7 @@ comments in the version-control system.
 2000-12-03  Harlan Stenn  <stenn at whimsy.udel.edu>
 
 	* ntpd/ntp_proto.c (receive): That any_interface is now an
-	rbufp->dstadr.
+	rbufp->dstaddr.
 	Various other doc and code cleanup.
 	* ntpd/ntp_peer.c (findmanycastpeer): Fixes
 	From Dave Mills
@@ -1912,7 +1912,7 @@ comments in the version-control system.
 
 2000-07-24  Harlan Stenn  <stenn at whimsy.udel.edu>
 
-	* ntpd/ntp_proto.c (receive): dstadr_sin needs  higher visibility
+	* ntpd/ntp_proto.c (receive): dstaddr_sin needs  higher visibility
 	From: Dave Mills
 
 	* flock-build: Added baldwin
@@ -5263,7 +5263,7 @@ Sat Oct 10 20:13:14 1998  Harlan Stenn  <stenn at whimsy.udel.edu>
 
 	* ntpd/ntpd.c (ntpdmain): HAVE_SETPGRP_0 typo.
 	* parseutil/dcfd.c (detach): Ditto.
-	* ntpd/ntp_control.c (ctl_putpeer): Sometimes, peer->dstadr is
+	* ntpd/ntp_control.c (ctl_putpeer): Sometimes, peer->dstaddr is
 	NIL.
 	From: Perry Ross <pross at platinum.com>
 


=====================================
docs/includes/ntpq-body.txt
=====================================
--- a/docs/includes/ntpq-body.txt
+++ b/docs/includes/ntpq-body.txt
@@ -264,7 +264,7 @@ ind assid status conf reach auth condition last_event cnt
   mobilized and unmobilized associations.
 
 +lpeers+ [+-4+ | +-6+]::
-  Print a peer spreadsheet for the appropriate IP version(s). _dstadr_
+  Print a peer spreadsheet for the appropriate IP version(s). _dstaddr_
   (associated with any given IP version).
 
 +monstats+::
@@ -320,7 +320,7 @@ which could not be verified in parentheses.
 
 +opeers+ [+-4+ | +-6+]::
   Obtain and print the old-style list of all peers and clients showing
-  _dstadr_ (associated with any given IP version), rather than the
+  _dstaddr_ (associated with any given IP version), rather than the
   _refid_.
 
 +passociations+::
@@ -497,7 +497,7 @@ association. Not all variables are displayed in some configurations.
 |+associd+       |association ID
 |+status+        |link:decode.html#peer[peer status word]
 |+srcaddr srcport+|source (remote) IP address and port
-|+dstadr dstport+|destination (local) IP address and port
+|+dstaddr dstport+|destination (local) IP address and port
 |+leap+          |leap indicator (0-3)
 |+stratum+       |stratum (0-15)
 |+precision+     |precision (log~2~ s)


=====================================
include/ntp.h
=====================================
--- a/include/ntp.h
+++ b/include/ntp.h
@@ -245,7 +245,7 @@ struct peer {
 	char *	hostname;	/* if non-NULL, remote name */
 	struct addrinfo *addrs;	/* hostname query result */
 	struct addrinfo *ai;	/* position within addrs */
-	endpt *	dstadr;		/* local address */
+	endpt *	dstaddr;		/* local address */
 	associd_t associd;	/* association ID */
 	uint8_t	version;	/* version number */
 	uint8_t	hmode;		/* local association mode */


=====================================
include/ntpd.h
=====================================
--- a/include/ntpd.h
+++ b/include/ntpd.h
@@ -170,7 +170,7 @@ extern	struct peer *findexistingpeer(sockaddr_u *, const char *,
 				      struct peer *, int, uint8_t);
 extern	struct peer *findpeer	(struct recvbuf *, int, int *);
 extern	struct peer *findpeerbyassoc(associd_t);
-extern  void	set_peerdstadr	(struct peer *, endpt *);
+extern  void	set_peerdstaddr	(struct peer *, endpt *);
 extern	struct peer *newpeer	(sockaddr_u *, const char *,
 				 endpt *, uint8_t, uint8_t,
 				 uint8_t, uint8_t, u_int, uint8_t, uint32_t,
@@ -287,7 +287,7 @@ extern	void	record_loop_stats (double, double, double, double, int);
 extern	void	record_clock_stats (sockaddr_u *, const char *);
 extern	int	mprintf_clock_stats(sockaddr_u *, const char *, ...)
 			NTP_PRINTF(2, 3);
-extern	void	record_raw_stats (sockaddr_u *srcaddr, sockaddr_u *dstadr, l_fp *t1, l_fp *t2, l_fp *t3, l_fp *t4, int leap, int version, int mode, int stratum, int ppoll, int precision, double root_delay, double root_dispersion, uint32_t refid);
+extern	void	record_raw_stats (sockaddr_u *srcaddr, sockaddr_u *dstaddr, l_fp *t1, l_fp *t2, l_fp *t3, l_fp *t4, int leap, int version, int mode, int stratum, int ppoll, int precision, double root_delay, double root_dispersion, uint32_t refid);
 extern	void	check_leap_file	(int is_daily_check, uint32_t ntptime, const time_t * systime);
 extern	void	record_crypto_stats (sockaddr_u *, const char *);
 #ifdef DEBUG


=====================================
include/recvbuff.h
=====================================
--- a/include/recvbuff.h
+++ b/include/recvbuff.h
@@ -59,7 +59,7 @@ struct recvbuf {
 #ifdef HAVE_IO_COMPLETION_PORT
 	int		recv_srcaddr_len;/* filled in on completion */
 #endif
-	endpt *		dstadr;		/* address pkt arrived on */
+	endpt *		dstaddr;		/* address pkt arrived on */
 	SOCKET		fd;		/* fd on which it was received */
 	int		msg_flags;	/* Flags received about the packet */
 	l_fp		recv_time;	/* time of arrival */


=====================================
ntpd/ntp_control.c
=====================================
--- a/ntpd/ntp_control.c
+++ b/ntpd/ntp_control.c
@@ -479,7 +479,7 @@ static const struct ctl_var peer_var[] = {
 	{ CP_AUTHENTIC, RO, "authentic" },	/* 3 */
 	{ CP_SRCADR,	RO, "srcaddr" },		/* 4 */
 	{ CP_SRCPORT,	RO, "srcport" },	/* 5 */
-	{ CP_DSTADR,	RO, "dstadr" },		/* 6 */
+	{ CP_DSTADR,	RO, "dstaddr" },		/* 6 */
 	{ CP_DSTPORT,	RO, "dstport" },	/* 7 */
 	{ CP_LEAP,	RO, "leap" },		/* 8 */
 	{ CP_HMODE,	RO, "hmode" },		/* 9 */
@@ -946,7 +946,7 @@ process_control(
 	 */
 	numctlreq++;
 	rmt_addr = &rbufp->recv_srcaddr;
-	lcl_inter = rbufp->dstadr;
+	lcl_inter = rbufp->dstaddr;
 	pkt = (struct ntp_control *)&rbufp->recv_pkt;
 
 	/*
@@ -1752,7 +1752,7 @@ ctl_putsys(
 		break;
 
 	case CS_PEERADR:
-		if (sys_peer != NULL && sys_peer->dstadr != NULL)
+		if (sys_peer != NULL && sys_peer->dstaddr != NULL)
 			ss = sptoa(&sys_peer->srcaddr);
 		else
 			ss = "0.0.0.0:0";
@@ -2371,15 +2371,15 @@ ctl_putpeer(
 
 	case CP_DSTADR:
 		ctl_putadr(peer_var[id].text, 0,
-			   (p->dstadr != NULL)
-				? &p->dstadr->sin
+			   (p->dstaddr != NULL)
+				? &p->dstaddr->sin
 				: NULL);
 		break;
 
 	case CP_DSTPORT:
 		ctl_putuint(peer_var[id].text,
-			    (p->dstadr != NULL)
-				? SRCPORT(&p->dstadr->sin)
+			    (p->dstaddr != NULL)
+				? SRCPORT(&p->dstaddr->sin)
 				: 0);
 		break;
 
@@ -4413,7 +4413,7 @@ set_trap(
 	 * Call ctlsettrap() to do the work.  Return
 	 * an error if it can't assign the trap.
 	 */
-	if (!ctlsettrap(&rbufp->recv_srcaddr, rbufp->dstadr, traptype,
+	if (!ctlsettrap(&rbufp->recv_srcaddr, rbufp->dstaddr, traptype,
 			(int)res_version))
 		ctl_error(CERR_NORESOURCE);
 	ctl_flushpkt(0);
@@ -4444,7 +4444,7 @@ unset_trap(
 	/*
 	 * Call ctlclrtrap() to clear this out.
 	 */
-	if (!ctlclrtrap(&rbufp->recv_srcaddr, rbufp->dstadr, traptype))
+	if (!ctlclrtrap(&rbufp->recv_srcaddr, rbufp->dstaddr, traptype))
 		ctl_error(CERR_BADASSOC);
 	ctl_flushpkt(0);
 }


=====================================
ntpd/ntp_crypto.c
=====================================
--- a/ntpd/ntp_crypto.c
+++ b/ntpd/ntp_crypto.c
@@ -227,7 +227,7 @@ readlink(char * link, char * file, int len) {
 keyid_t
 session_key(
 	sockaddr_u *srcaddr, 	/* source address */
-	sockaddr_u *dstadr, 	/* destination address */
+	sockaddr_u *dstaddr, 	/* destination address */
 	keyid_t	keyno,		/* key ID */
 	keyid_t	private,	/* private value */
 	u_long	lifetime 	/* key lifetime */
@@ -239,7 +239,7 @@ session_key(
 	uint32_t	header[10];	/* data in network byte order */
 	u_int	hdlen, len;
 
-	if (!dstadr)
+	if (!dstaddr)
 		return 0;
 	
 	/*
@@ -250,7 +250,7 @@ session_key(
 	switch(AF(srcaddr)) {
 	case AF_INET:
 		header[0] = NSRCADR(srcaddr);
-		header[1] = NSRCADR(dstadr);
+		header[1] = NSRCADR(dstaddr);
 		header[2] = htonl(keyno);
 		header[3] = htonl(private);
 		hdlen = 4 * sizeof(uint32_t);
@@ -259,7 +259,7 @@ session_key(
 	case AF_INET6:
 		memcpy(&header[0], PSOCK_ADDR6(srcaddr),
 		    sizeof(struct in6_addr));
-		memcpy(&header[4], PSOCK_ADDR6(dstadr),
+		memcpy(&header[4], PSOCK_ADDR6(dstaddr),
 		    sizeof(struct in6_addr));
 		header[8] = htonl(keyno);
 		header[9] = htonl(private);
@@ -276,7 +276,7 @@ session_key(
 		authtrust(keyno, lifetime);
 	}
 	DPRINTF(2, ("session_key: %s > %s %08x %08x hash %08x life %lu\n",
-		    stoa(srcaddr), stoa(dstadr), keyno,
+		    stoa(srcaddr), stoa(dstaddr), keyno,
 		    private, keyid, lifetime));
 
 	return (keyid);
@@ -299,7 +299,7 @@ session_key(
 int
 make_keylist(
 	struct peer *peer,	/* peer structure pointer */
-	struct interface *dstadr /* interface */
+	struct interface *dstaddr /* interface */
 	)
 {
 	EVP_MD_CTX ctx;		/* signature context */
@@ -312,7 +312,7 @@ make_keylist(
 	u_int	len, mpoll;
 	int	i;
 
-	if (!dstadr)
+	if (!dstaddr)
 		return XEVNT_ERR;
 	
 	/*
@@ -353,7 +353,7 @@ make_keylist(
 	for (i = 0; i < NTP_MAXSESSION; i++) {
 		peer->keylist[i] = keyid;
 		peer->keynumber = i;
-		keyid = session_key(&dstadr->sin, &peer->srcaddr, keyid,
+		keyid = session_key(&dstaddr->sin, &peer->srcaddr, keyid,
 		    cookie, lifetime + mpoll);
 		lifetime -= mpoll;
 		if (auth_havekey(keyid) || keyid <= NTP_MAXKEY ||


=====================================
ntpd/ntp_io.c
=====================================
--- a/ntpd/ntp_io.c
+++ b/ntpd/ntp_io.c
@@ -388,7 +388,7 @@ collect_timing(struct recvbuf *rb, const char *tag, int count, l_fp *dts)
 
 	snprintf(buf, sizeof(buf), "%s %d %s %s",
 		 (rb != NULL)
-		     ? ((rb->dstadr != NULL)
+		     ? ((rb->dstaddr != NULL)
 			    ? stoa(&rb->recv_srcaddr)
 			    : "-REFCLOCK-")
 		     : "-",
@@ -1997,7 +1997,7 @@ update_interfaces(
 
 		/* disconnect peers from deleted endpt. */
 		while (ep->peers != NULL)
-			set_peerdstadr(ep->peers, NULL);
+			set_peerdstaddr(ep->peers, NULL);
 
 		/*
 		 * update globals in case we lose
@@ -3281,7 +3281,7 @@ read_refclock_packet(
 	 */
 	rb->recv_length = buflen;
 	rb->recv_peer = rp->srcclock;
-	rb->dstadr = 0;
+	rb->dstaddr = 0;
 	rb->fd = fd;
 	rb->recv_time = ts;
 	rb->receiver = rp->clock_recv;
@@ -3539,7 +3539,7 @@ read_network_packet(
 	 * Got one.  Mark how and when it got here,
 	 * put it on the full list and do bookkeeping.
 	 */
-	rb->dstadr = itf;
+	rb->dstaddr = itf;
 	rb->fd = fd;
 #ifdef USE_PACKET_TIMESTAMP
 	/* pick up a network time stamp if possible */
@@ -3822,7 +3822,7 @@ endpt *
 select_peerinterface(
 	struct peer *	peer,
 	sockaddr_u *	srcaddr,
-	endpt *		dstadr
+	endpt *		dstaddr
 	)
 {
 	endpt *ep;
@@ -3851,13 +3851,13 @@ select_peerinterface(
 			DPRINTF(4, ("No *-cast local address found for address %s\n",
 				stoa(srcaddr)));
 	} else {
-		ep = dstadr;
+		ep = dstaddr;
 		if (NULL == ep)
 			ep = wild;
 	}
 	/*
 	 * If it is a multicast address, findbcastinter() may not find
-	 * it.  For unicast, we get to find the interface when dstadr is
+	 * it.  For unicast, we get to find the interface when dstaddr is
 	 * given to us as the wildcard (ANY_INTERFACE_CHOOSE).  Either
 	 * way, try a little harder.
 	 */


=====================================
ntpd/ntp_monitor.c
=====================================
--- a/ntpd/ntp_monitor.c
+++ b/ntpd/ntp_monitor.c
@@ -477,8 +477,8 @@ ntp_monitor(
 	mon->leak = 0;
 	memcpy(&mon->rmtadr, &rbufp->recv_srcaddr, sizeof(mon->rmtadr));
 	mon->vn_mode = VN_MODE(version, mode);
-	mon->lcladr = rbufp->dstadr;
-	mon->cast_flags = (uint8_t)(((rbufp->dstadr->flags &
+	mon->lcladr = rbufp->dstaddr;
+	mon->cast_flags = (uint8_t)(((rbufp->dstaddr->flags &
 	    INT_MCASTOPEN) && rbufp->fd == mon->lcladr->fd) ? MDF_MCAST
 	    : rbufp->fd == mon->lcladr->bfd ? MDF_BCAST : MDF_UCAST);
 


=====================================
ntpd/ntp_peer.c
=====================================
--- a/ntpd/ntp_peer.c
+++ b/ntpd/ntp_peer.c
@@ -337,9 +337,9 @@ findpeer(
 	 */
 	if (NULL == p) {
 		*action = MATCH_ASSOC(NO_PEER, pkt_mode);
-	} else if (p->dstadr != rbufp->dstadr) {
-		set_peerdstadr(p, rbufp->dstadr);
-		if (p->dstadr == rbufp->dstadr) {
+	} else if (p->dstaddr != rbufp->dstaddr) {
+		set_peerdstaddr(p, rbufp->dstaddr);
+		if (p->dstaddr == rbufp->dstaddr) {
 			DPRINTF(1, ("Changed %s local address to match response\n",
 				    stoa(&p->srcaddr)));
 			return findpeer(rbufp, pkt_mode, action);
@@ -529,7 +529,7 @@ unpeer(
 {
 	mprintf_event(PEVNT_DEMOBIL, peer, "assoc %u", peer->associd);
 	restrict_source(&peer->srcaddr, 1, 0);
-	set_peerdstadr(peer, NULL);
+	set_peerdstaddr(peer, NULL);
 	peer_demobilizations++;
 	peer_associations--;
 	if (FLAG_PREEMPT & peer->flags)
@@ -553,7 +553,7 @@ struct peer *
 peer_config(
 	sockaddr_u *	srcaddr,
 	const char *	hostname,
-	endpt *		dstadr,
+	endpt *		dstaddr,
 	uint8_t		hmode,
 	uint8_t		version,
 	uint8_t		minpoll,
@@ -604,45 +604,45 @@ peer_config(
 		flags |= FLAG_IBURST;
 	if ((MDF_ACAST | MDF_POOL) & cast_flags)
 		flags &= ~FLAG_PREEMPT;
-	return newpeer(srcaddr, hostname, dstadr, hmode, version,
+	return newpeer(srcaddr, hostname, dstaddr, hmode, version,
 	    minpoll, maxpoll, flags, cast_flags, ttl, key, ident);
 }
 
 /*
- * setup peer dstadr field keeping it in sync with the interface
+ * setup peer dstaddr field keeping it in sync with the interface
  * structures
  */
 void
-set_peerdstadr(
+set_peerdstaddr(
 	struct peer *	p,
-	endpt *		dstadr
+	endpt *		dstaddr
 	)
 {
 	struct peer *	unlinked;
 
-	if (p->dstadr == dstadr)
+	if (p->dstaddr == dstaddr)
 		return;
 
 	/*
 	 * Don't accept updates to a separate multicast receive-only
 	 * endpt while a BCLNT peer is running its unicast protocol.
 	 */
-	if (dstadr != NULL && (FLAG_BC_VOL & p->flags) &&
-	    (INT_MCASTIF & dstadr->flags) && MODE_CLIENT == p->hmode) {
+	if (dstaddr != NULL && (FLAG_BC_VOL & p->flags) &&
+	    (INT_MCASTIF & dstaddr->flags) && MODE_CLIENT == p->hmode) {
 		return;
 	}
-	if (p->dstadr != NULL) {
-		p->dstadr->peercnt--;
-		UNLINK_SLIST(unlinked, p->dstadr->peers, p, ilink,
+	if (p->dstaddr != NULL) {
+		p->dstaddr->peercnt--;
+		UNLINK_SLIST(unlinked, p->dstaddr->peers, p, ilink,
 			     struct peer);
 		msyslog(LOG_INFO, "%s local addr %s -> %s",
-			stoa(&p->srcaddr), latoa(p->dstadr),
-			latoa(dstadr));
+			stoa(&p->srcaddr), latoa(p->dstaddr),
+			latoa(dstaddr));
 	}
-	p->dstadr = dstadr;
-	if (dstadr != NULL) {
-		LINK_SLIST(dstadr->peers, p, ilink);
-		dstadr->peercnt++;
+	p->dstaddr = dstaddr;
+	if (dstaddr != NULL) {
+		LINK_SLIST(dstaddr->peers, p, ilink);
+		dstaddr->peercnt++;
 	}
 }
 
@@ -661,8 +661,8 @@ peer_refresh_interface(
 
 	DPRINTF(4, (
 	    "peer_refresh_interface: %s->%s mode %d vers %d poll %d %d flags 0x%x 0x%x ttl %u key %08x: new interface: ",
-	    p->dstadr == NULL ? "<null>" :
-	    stoa(&p->dstadr->sin), stoa(&p->srcaddr), p->hmode,
+	    p->dstaddr == NULL ? "<null>" :
+	    stoa(&p->dstaddr->sin), stoa(&p->srcaddr), p->hmode,
 	    p->version, p->minpoll, p->maxpoll, p->flags, p->cast_flags,
 	    p->ttl, p->keyid));
 	if (niface != NULL) {
@@ -679,13 +679,13 @@ peer_refresh_interface(
 		DPRINTF(4, ("<NONE>\n"));
 	}
 
-	piface = p->dstadr;
-	set_peerdstadr(p, niface);
-	if (p->dstadr != NULL) {
+	piface = p->dstaddr;
+	set_peerdstaddr(p, niface);
+	if (p->dstaddr != NULL) {
 		/*
 		 * clear crypto if we change the local address
 		 */
-		if (p->dstadr != piface && !(MDF_ACAST & p->cast_flags)
+		if (p->dstaddr != piface && !(MDF_ACAST & p->cast_flags)
 		    && MODE_BROADCAST != p->pmode)
 			peer_clear(p, "XFAC");
 
@@ -693,14 +693,14 @@ peer_refresh_interface(
 	 	 * Broadcast needs the socket enabled for broadcast
 	 	 */
 		if (MDF_BCAST & p->cast_flags)
-			enable_broadcast(p->dstadr, &p->srcaddr);
+			enable_broadcast(p->dstaddr, &p->srcaddr);
 
 		/*
 	 	 * Multicast needs the socket interface enabled for
 		 * multicast
 	 	 */
 		if (MDF_MCAST & p->cast_flags)
-			enable_multicast_if(p->dstadr, &p->srcaddr);
+			enable_multicast_if(p->dstaddr, &p->srcaddr);
 	}
 }
 
@@ -721,7 +721,7 @@ refresh_all_peerinterfaces(void)
 	 * or if the one they have hasn't worked for a while.
 	 */
 	for (p = peer_list; p != NULL; p = p->p_link) {
-		if (!(p->dstadr && (p->reach & 0x3)))	// Bug 2849 XOR 2043
+		if (!(p->dstaddr && (p->reach & 0x3)))	// Bug 2849 XOR 2043
 			peer_refresh_interface(p);
 	}
 }
@@ -734,7 +734,7 @@ struct peer *
 newpeer(
 	sockaddr_u *	srcaddr,
 	const char *	hostname,
-	endpt *		dstadr,
+	endpt *		dstaddr,
 	uint8_t		hmode,
 	uint8_t		version,
 	uint8_t		minpoll,
@@ -777,17 +777,17 @@ newpeer(
 	 * actual interface, because that's what gets put into the peer
 	 * structure.
 	 */
-	if (dstadr != NULL) {
+	if (dstaddr != NULL) {
 		peer = findexistingpeer(srcaddr, hostname, NULL, hmode,
 					cast_flags);
 		while (peer != NULL) {
-			if (peer->dstadr == dstadr ||
+			if (peer->dstaddr == dstaddr ||
 			    ((MDF_BCLNT & cast_flags) &&
 			     (MDF_BCLNT & peer->cast_flags)))
 				break;
 
-			if (dstadr == ANY_INTERFACE_CHOOSE(srcaddr) &&
-			    peer->dstadr == findinterface(srcaddr))
+			if (dstaddr == ANY_INTERFACE_CHOOSE(srcaddr) &&
+			    peer->dstaddr == findinterface(srcaddr))
 				break;
 
 			peer = findexistingpeer(srcaddr, hostname, peer,
@@ -839,8 +839,8 @@ newpeer(
 	peer->version = version;
 	peer->flags = flags;
 	peer->cast_flags = cast_flags;
-	set_peerdstadr(peer, 
-		       select_peerinterface(peer, srcaddr, dstadr));
+	set_peerdstaddr(peer, 
+		       select_peerinterface(peer, srcaddr, dstaddr));
 
 	/*
 	 * It is an error to set minpoll less than NTP_MINPOLL or to
@@ -860,10 +860,10 @@ newpeer(
 	if (peer->minpoll > peer->maxpoll)
 		peer->minpoll = peer->maxpoll;
 
-	if (peer->dstadr != NULL)
+	if (peer->dstaddr != NULL)
 		DPRINTF(3, ("newpeer(%s): using fd %d and our addr %s\n",
-			stoa(srcaddr), peer->dstadr->fd,
-			stoa(&peer->dstadr->sin)));
+			stoa(srcaddr), peer->dstaddr->fd,
+			stoa(&peer->dstaddr->sin)));
 	else
 		DPRINTF(3, ("newpeer(%s): local interface currently not bound\n",
 			stoa(srcaddr)));	
@@ -871,14 +871,14 @@ newpeer(
 	/*
 	 * Broadcast needs the socket enabled for broadcast
 	 */
-	if ((MDF_BCAST & cast_flags) && peer->dstadr != NULL)
-		enable_broadcast(peer->dstadr, srcaddr);
+	if ((MDF_BCAST & cast_flags) && peer->dstaddr != NULL)
+		enable_broadcast(peer->dstaddr, srcaddr);
 
 	/*
 	 * Multicast needs the socket interface enabled for multicast
 	 */
-	if ((MDF_MCAST & cast_flags) && peer->dstadr != NULL)
-		enable_multicast_if(peer->dstadr, srcaddr);
+	if ((MDF_MCAST & cast_flags) && peer->dstaddr != NULL)
+		enable_multicast_if(peer->dstaddr, srcaddr);
 
 #ifdef ENABLE_AUTOKEY
 	if (key > NTP_MAXKEY)
@@ -924,14 +924,14 @@ newpeer(
 			/*
 			 * Dump it, something screwed up
 			 */
-			set_peerdstadr(peer, NULL);
+			set_peerdstaddr(peer, NULL);
 			free_peer(peer, 0);
 			return NULL;
 		}
 #else /* REFCLOCK */
 		msyslog(LOG_ERR, "refclock %s isn't supported. ntpd was compiled without refclock support.",
 			stoa(&peer->srcaddr));
-		set_peerdstadr(peer, NULL);
+		set_peerdstaddr(peer, NULL);
 		free_peer(peer, 0);
 		return NULL;
 #endif /* REFCLOCK */
@@ -951,7 +951,7 @@ newpeer(
 	restrict_source(&peer->srcaddr, 0, 0);
 	mprintf_event(PEVNT_MOBIL, peer, "assoc %d", peer->associd);
 	DPRINTF(1, ("newpeer: %s->%s mode %u vers %u poll %u %u flags 0x%x 0x%x ttl %u key %08x\n",
-	    latoa(peer->dstadr), stoa(&peer->srcaddr), peer->hmode,
+	    latoa(peer->dstaddr), stoa(&peer->srcaddr), peer->hmode,
 	    peer->version, peer->minpoll, peer->maxpoll, peer->flags,
 	    peer->cast_flags, peer->ttl, peer->keyid));
 	return peer;


=====================================
ntpd/ntp_proto.c
=====================================
--- a/ntpd/ntp_proto.c
+++ b/ntpd/ntp_proto.c
@@ -397,7 +397,7 @@ receive(
 	keyid_t	skeyid = 0;		/* key IDs */
 	uint32_t	opcode = 0;		/* extension field opcode */
 #if defined(DEBUG) || defined(ENABLE_AUTOKEY)
-	sockaddr_u *dstadr_sin; 	/* active runway */
+	sockaddr_u *dstaddr_sin; 	/* active runway */
 #endif
 	struct peer *peer2;		/* aux peer structure pointer */
 	endpt *	match_ep;		/* newpeer() local address */
@@ -433,9 +433,9 @@ receive(
 	}
 	restrict_mask = restrictions(&rbufp->recv_srcaddr);
 	DPRINTF(2, ("receive: at %ld %s<-%s flags %x restrict %03x\n",
-		    current_time, stoa(&rbufp->dstadr->sin),
+		    current_time, stoa(&rbufp->dstaddr->sin),
 		    stoa(&rbufp->recv_srcaddr),
-		    rbufp->dstadr->flags, restrict_mask));
+		    rbufp->dstaddr->flags, restrict_mask));
 	pkt = &rbufp->recv_pkt;
 	hisversion = PKT_VERSION(pkt->li_vn_mode);
 	hisleap = PKT_LEAP(pkt->li_vn_mode);
@@ -635,7 +635,7 @@ receive(
 	 */
 	peer = findpeer(rbufp,  hismode, &retcode);
 #ifdef DEBUG
-	dstadr_sin = &rbufp->dstadr->sin;
+	dstaddr_sin = &rbufp->dstaddr->sin;
 #endif
 	NTOHL_FP(&pkt->org, &p_org);
 	NTOHL_FP(&pkt->rec, &p_rec);
@@ -672,7 +672,7 @@ receive(
 		if (debug)
 			printf(
 			    "receive: at %ld %s<-%s mode %d len %zd\n",
-			    current_time, stoa(dstadr_sin),
+			    current_time, stoa(dstaddr_sin),
 			    stoa(&rbufp->recv_srcaddr), hismode,
 			    authlen);
 #endif
@@ -683,7 +683,7 @@ receive(
 		if (debug)
 			printf(
 			    "receive: at %ld %s<-%s mode %d keyid %08x len %zd auth %d\n",
-			    current_time, stoa(dstadr_sin),
+			    current_time, stoa(dstaddr_sin),
 			    stoa(&rbufp->recv_srcaddr), hismode, skeyid,
 			    authlen + has_mac, is_authentic);
 #endif
@@ -754,18 +754,18 @@ receive(
 				 * mobilized. However, if this is from
 				 * the wildcard interface, game over.
 				 */
-				if (crypto_flags && rbufp->dstadr ==
+				if (crypto_flags && rbufp->dstaddr ==
 				    ANY_INTERFACE_CHOOSE(&rbufp->recv_srcaddr)) {
 					sys_restricted++;
 					return;	     /* no wildcard */
 				}
 				pkeyid = 0;
-				if (!SOCK_UNSPEC(&rbufp->dstadr->bcast))
-					dstadr_sin =
-					    &rbufp->dstadr->bcast;
+				if (!SOCK_UNSPEC(&rbufp->dstaddr->bcast))
+					dstaddr_sin =
+					    &rbufp->dstaddr->bcast;
 			} else if (peer == NULL) {
 				pkeyid = session_key(
-				    &rbufp->recv_srcaddr, dstadr_sin, 0,
+				    &rbufp->recv_srcaddr, dstaddr_sin, 0,
 				    sys_private, 0);
 			} else {
 				pkeyid = peer->pcookie;
@@ -780,13 +780,13 @@ receive(
 			 */
 			if (authlen > LEN_PKT_NOMAC && pkeyid != 0) {
 				session_key(&rbufp->recv_srcaddr,
-				    dstadr_sin, skeyid, 0, 2);
+				    dstaddr_sin, skeyid, 0, 2);
 				tkeyid = session_key(
-				    &rbufp->recv_srcaddr, dstadr_sin,
+				    &rbufp->recv_srcaddr, dstaddr_sin,
 				    skeyid, pkeyid, 0);
 			} else {
 				tkeyid = session_key(
-				    &rbufp->recv_srcaddr, dstadr_sin,
+				    &rbufp->recv_srcaddr, dstaddr_sin,
 				    skeyid, pkeyid, 2);
 			}
 
@@ -813,7 +813,7 @@ receive(
 		if (debug)
 			printf(
 			    "receive: at %ld %s<-%s mode %d keyid %08x len %zd auth %d\n",
-			    current_time, stoa(dstadr_sin),
+			    current_time, stoa(dstaddr_sin),
 			    stoa(&rbufp->recv_srcaddr), hismode, skeyid,
 			    authlen + has_mac, is_authentic);
 #endif
@@ -843,7 +843,7 @@ receive(
 		 * If authentication OK, send a server reply; otherwise,
 		 * send a crypto-NAK.
 		 */
-		if (!(rbufp->dstadr->flags & INT_MCASTOPEN)) {
+		if (!(rbufp->dstaddr->flags & INT_MCASTOPEN)) {
 			if (AUTH(restrict_mask & RES_DONTTRUST,
 			   is_authentic)) {
 				fast_xmit(rbufp, MODE_SERVER, skeyid,
@@ -884,7 +884,7 @@ receive(
 		 */
 		if (sys_leap == LEAP_NOTINSYNC || sys_stratum >=
 		    hisstratum || (!sys_cohort && sys_stratum ==
-		    hisstratum + 1) || rbufp->dstadr->addr_refid ==
+		    hisstratum + 1) || rbufp->dstaddr->addr_refid ==
 		    pkt->refid) {
 			sys_declined++;
 			return;			/* no help */
@@ -949,7 +949,7 @@ receive(
 			sys_declined++;
 			return;			/* no help */
 		}
-		peer = newpeer(&rbufp->recv_srcaddr, NULL, rbufp->dstadr,
+		peer = newpeer(&rbufp->recv_srcaddr, NULL, rbufp->dstaddr,
 			       MODE_CLIENT, hisversion, peer2->minpoll,
 			       peer2->maxpoll, FLAG_PREEMPT |
 			       (FLAG_IBURST & peer2->flags), MDF_UCAST |
@@ -1034,8 +1034,8 @@ receive(
 		 * ephemeral associations are unique across all local
 		 * endpoints.
 		 */
-		if (!(INT_MCASTOPEN & rbufp->dstadr->flags))
-			match_ep = rbufp->dstadr;
+		if (!(INT_MCASTOPEN & rbufp->dstaddr->flags))
+			match_ep = rbufp->dstaddr;
 		else
 			match_ep = NULL;
 
@@ -1177,7 +1177,7 @@ receive(
 		 * Mobilize a symmetric passive association.
 		 */
 		if ((peer = newpeer(&rbufp->recv_srcaddr, NULL,
-		    rbufp->dstadr, MODE_PASSIVE, hisversion, pkt->ppoll,
+		    rbufp->dstaddr, MODE_PASSIVE, hisversion, pkt->ppoll,
 		    NTP_MAXDPOLL, 0, MDF_UCAST, 0, skeyid,
 		    sys_ident)) == NULL) {
 			sys_declined++;
@@ -1496,7 +1496,7 @@ receive(
 					break;
 				}
 				tkeyid = session_key(
-				    &rbufp->recv_srcaddr, dstadr_sin,
+				    &rbufp->recv_srcaddr, dstaddr_sin,
 				    tkeyid, pkeyid, 0);
 			}
 			if (peer->flash & BOGON8)
@@ -1584,8 +1584,8 @@ process_packet(
 	/*
 	 * Capture the header values in the client/peer association..
 	 */
-	record_raw_stats(&peer->srcaddr, peer->dstadr ?
-	    &peer->dstadr->sin : NULL,
+	record_raw_stats(&peer->srcaddr, peer->dstaddr ?
+	    &peer->dstaddr->sin : NULL,
 	    &p_org, &p_rec, &p_xmt, &peer->dst,
 	    pleap, pversion, pmode, pstratum, pkt->ppoll, pkt->precision,
 	    p_del, p_disp, pkt->refid);
@@ -2544,8 +2544,8 @@ clock_select(void)
 			uint32_t	localmet;
 			uint32_t peermet;
 
-			if (peer->dstadr != NULL)
-				localmet = ntohl(peer->dstadr->addr_refid);
+			if (peer->dstaddr != NULL)
+				localmet = ntohl(peer->dstaddr->addr_refid);
 			else
 				localmet = UINT32_MAX;
 			peermet = ntohl(addr2refid(&peer->srcaddr));
@@ -3056,7 +3056,7 @@ peer_xmit(
 	keyid_t	xkeyid = 0;	/* transmit key ID */
 	l_fp	xmt_tx, xmt_ty;
 
-	if (!peer->dstadr)	/* drop peers without interface */
+	if (!peer->dstaddr)	/* drop peers without interface */
 		return;
 
 	xpkt.li_vn_mode = PKT_LI_VN_MODE(sys_leap, peer->version,
@@ -3116,7 +3116,7 @@ peer_xmit(
 			}
 		}
 		peer->t21_bytes = sendlen;
-		intercept_sendpkt(__func__, &peer->srcaddr, peer->dstadr, sys_ttl[peer->ttl],
+		intercept_sendpkt(__func__, &peer->srcaddr, peer->dstaddr, sys_ttl[peer->ttl],
 		    &xpkt, sendlen);
 		peer->sent++;
 		peer->throttle += (1 << peer->minpoll) - 2;
@@ -3137,8 +3137,8 @@ peer_xmit(
 #ifdef DEBUG
 		if (debug)
 			printf("transmit: at %ld %s->%s mode %d len %zu\n",
-		    	    current_time, peer->dstadr ?
-			    stoa(&peer->dstadr->sin) : "-",
+		    	    current_time, peer->dstaddr ?
+			    stoa(&peer->dstaddr->sin) : "-",
 		            stoa(&peer->srcaddr), peer->hmode, sendlen);
 #endif
 		return;
@@ -3198,7 +3198,7 @@ peer_xmit(
 			 * regenerate it.
 			 */
 			if (peer->keynumber == 0)
-				make_keylist(peer, peer->dstadr);
+				make_keylist(peer, peer->dstaddr);
 			else
 				peer->keynumber--;
 			xkeyid = peer->keylist[peer->keynumber];
@@ -3384,7 +3384,7 @@ peer_xmit(
 		 * fields are present, the cookie value is zero.
 		 */
 		if (sendlen > (int)LEN_PKT_NOMAC) {
-			session_key(&peer->dstadr->sin, &peer->srcaddr,
+			session_key(&peer->dstaddr->sin, &peer->srcaddr,
 			    xkeyid, 0, 2);
 		}
 	}
@@ -3429,7 +3429,7 @@ peer_xmit(
 		exit (-1);
 	}
 	peer->t21_bytes = sendlen;
-	intercept_sendpkt(__func__, &peer->srcaddr, peer->dstadr, sys_ttl[peer->ttl], &xpkt,
+	intercept_sendpkt(__func__, &peer->srcaddr, peer->dstaddr, sys_ttl[peer->ttl], &xpkt,
 	    sendlen);
 	peer->sent++;
 	peer->throttle += (1 << peer->minpoll) - 2;
@@ -3451,7 +3451,7 @@ peer_xmit(
 #ifdef DEBUG
 	if (debug)
 		printf("transmit: at %ld %s->%s mode %d keyid %08x len %zu index %d\n",
-		    current_time, latoa(peer->dstadr),
+		    current_time, latoa(peer->dstaddr),
 		    ntoa(&peer->srcaddr), peer->hmode, xkeyid, sendlen,
 		    peer->keynumber);
 #endif
@@ -3459,8 +3459,8 @@ peer_xmit(
 #ifdef DEBUG
 	if (debug)
 		printf("transmit: at %ld %s->%s mode %d keyid %08x len %zd\n",
-		    current_time, peer->dstadr ?
-		    ntoa(&peer->dstadr->sin) : "-",
+		    current_time, peer->dstaddr ?
+		    ntoa(&peer->dstaddr->sin) : "-",
 		    ntoa(&peer->srcaddr), peer->hmode, xkeyid, sendlen);
 #endif
 #endif	/* !ENABLE_AUTOKEY */
@@ -3509,8 +3509,8 @@ fast_xmit(
 	 * must go out another way.
 	 */
 	rpkt = &rbufp->recv_pkt;
-	if (rbufp->dstadr->flags & INT_MCASTOPEN)
-		rbufp->dstadr = findinterface(&rbufp->recv_srcaddr);
+	if (rbufp->dstaddr->flags & INT_MCASTOPEN)
+		rbufp->dstaddr = findinterface(&rbufp->recv_srcaddr);
 
 	/*
 	 * If this is a kiss-o'-death (KoD) packet, show leap
@@ -3610,13 +3610,13 @@ fast_xmit(
 	 */
 	sendlen = LEN_PKT_NOMAC;
 	if (rbufp->recv_length == sendlen) {
-		intercept_sendpkt(__func__, &rbufp->recv_srcaddr, rbufp->dstadr, 0, &xpkt,
+		intercept_sendpkt(__func__, &rbufp->recv_srcaddr, rbufp->dstaddr, 0, &xpkt,
 		    sendlen);
 #ifdef DEBUG
 		if (debug)
 			printf(
 			    "transmit: at %ld %s->%s mode %d len %zd\n",
-			    current_time, stoa(&rbufp->dstadr->sin),
+			    current_time, stoa(&rbufp->dstaddr->sin),
 			    stoa(&rbufp->recv_srcaddr), xmode, sendlen);
 #endif
 		return;
@@ -3644,9 +3644,9 @@ fast_xmit(
 		 * use the cookie to generate the session key.
 		 */
 		cookie = session_key(&rbufp->recv_srcaddr,
-		    &rbufp->dstadr->sin, 0, sys_private, 0);
+		    &rbufp->dstaddr->sin, 0, sys_private, 0);
 		if (rbufp->recv_length > sendlen + (int)MAX_MAC_LEN) {
-			session_key(&rbufp->dstadr->sin,
+			session_key(&rbufp->dstaddr->sin,
 			    &rbufp->recv_srcaddr, xkeyid, 0, 2);
 			temp32 = CRYPTO_RESP;
 			rpkt->exten[0] |= htonl(temp32);
@@ -3654,7 +3654,7 @@ fast_xmit(
 			    sendlen, (struct exten *)rpkt->exten,
 			    cookie);
 		} else {
-			session_key(&rbufp->dstadr->sin,
+			session_key(&rbufp->dstaddr->sin,
 			    &rbufp->recv_srcaddr, xkeyid, cookie, 2);
 		}
 	}
@@ -3665,7 +3665,7 @@ fast_xmit(
 	if (xkeyid > NTP_MAXKEY)
 		authtrust(xkeyid, 0);
 #endif	/* ENABLE_AUTOKEY */
-	intercept_sendpkt(__func__, &rbufp->recv_srcaddr, rbufp->dstadr, 0, &xpkt, sendlen);
+	intercept_sendpkt(__func__, &rbufp->recv_srcaddr, rbufp->dstaddr, 0, &xpkt, sendlen);
 	intercept_get_systime(__func__, &xmt_ty);
 	L_SUB(&xmt_ty, &xmt_tx);
 	sys_authdelay = xmt_ty;
@@ -3673,7 +3673,7 @@ fast_xmit(
 	if (debug)
 		printf(
 		    "transmit: at %ld %s->%s mode %d keyid %08x len %zd\n",
-		    current_time, ntoa(&rbufp->dstadr->sin),
+		    current_time, ntoa(&rbufp->dstaddr->sin),
 		    ntoa(&rbufp->recv_srcaddr), xmode, xkeyid, sendlen);
 #endif
 }
@@ -3882,8 +3882,8 @@ local_refid(
 {
 	endpt *	unicast_ep;
 
-	if (p->dstadr != NULL && !(INT_MCASTIF & p->dstadr->flags))
-		unicast_ep = p->dstadr;
+	if (p->dstaddr != NULL && !(INT_MCASTIF & p->dstaddr->flags))
+		unicast_ep = p->dstaddr;
 	else
 		unicast_ep = findinterface(&p->srcaddr);
 


=====================================
ntpd/ntp_signd.c
=====================================
--- a/ntpd/ntp_signd.c
+++ b/ntpd/ntp_signd.c
@@ -213,12 +213,12 @@ send_via_ntp_signd(
 			if (ntohl(samba_reply.op) == 3 && reply_len >  offsetof(struct samba_key_out, pkt)) {
 				sendlen = reply_len - offsetof(struct samba_key_out, pkt);
 				xpkt = &samba_reply.pkt;
-				sendpkt(&rbufp->recv_srcaddr, rbufp->dstadr, 0, xpkt, sendlen);
+				sendpkt(&rbufp->recv_srcaddr, rbufp->dstaddr, 0, xpkt, sendlen);
 #ifdef DEBUG
 				if (debug)
 					printf(
 						"transmit ntp_signd packet: at %ld %s->%s mode %d keyid %08x len %d\n",
-						current_time, ntoa(&rbufp->dstadr->sin),
+						current_time, ntoa(&rbufp->dstaddr->sin),
 						ntoa(&rbufp->recv_srcaddr), xmode, xkeyid, sendlen);
 #endif
 			}


=====================================
ntpd/ntp_util.c
=====================================
--- a/ntpd/ntp_util.c
+++ b/ntpd/ntp_util.c
@@ -535,7 +535,7 @@ mprintf_clock_stats(
 void
 record_raw_stats(
 	sockaddr_u *srcaddr,
-	sockaddr_u *dstadr,
+	sockaddr_u *dstaddr,
 	l_fp	*t1,		/* originate timestamp */
 	l_fp	*t2,		/* receive timestamp */
 	l_fp	*t3,		/* transmit timestamp */
@@ -564,7 +564,7 @@ record_raw_stats(
 	if (rawstats.fp != NULL) {
 		fprintf(rawstats.fp, "%lu %s %s %s %s %s %s %s %d %d %d %d %d %d %.6f %.6f %s\n",
 		    day, ulfptoa(&now, 3),
-		    stoa(srcaddr), dstadr ?  stoa(dstadr) : "-",
+		    stoa(srcaddr), dstaddr ?  stoa(dstaddr) : "-",
 		    ulfptoa(t1, 9), ulfptoa(t2, 9),
 		    ulfptoa(t3, 9), ulfptoa(t4, 9),
 		    leap, version, mode, stratum, ppoll, precision,


=====================================
ntpd/ntpsim.c
=====================================
--- a/ntpd/ntpsim.c
+++ b/ntpd/ntpsim.c
@@ -347,7 +347,7 @@ int simulate_server(
     rbuf.receiver = &receive;   /* callback to process the packet */
     rbuf.recv_length = LEN_PKT_NOMAC;
     rbuf.recv_pkt = xpkt;
-    rbuf.dstadr = inter;
+    rbuf.dstaddr = inter;
     rbuf.fd = inter->fd;
     memcpy(&rbuf.srcaddr, serv_addr, sizeof(rbuf.srcaddr));
     memcpy(&rbuf.recv_srcaddr, serv_addr, sizeof(rbuf.recv_srcaddr));


=====================================
ntpd/refclock_parse.c
=====================================
--- a/ntpd/refclock_parse.c
+++ b/ntpd/refclock_parse.c
@@ -1864,7 +1864,7 @@ local_input(
 #ifndef HAVE_IO_COMPLETION_PORT
 					buf->srcaddr       = rbufp->srcaddr;
 #endif
-					buf->dstadr       = rbufp->dstadr;
+					buf->dstaddr       = rbufp->dstaddr;
 					buf->receiver     = rbufp->receiver;
 					buf->fd           = rbufp->fd;
 					buf->X_from_where = rbufp->X_from_where;


=====================================
ntpq/libntpq.c
=====================================
--- a/ntpq/libntpq.c
+++ b/ntpq/libntpq.c
@@ -709,7 +709,7 @@ ntpq_get_assoc_clocktype(
 	int		i;
 	int		rc;
 	sockaddr_u	dum_store;
-	char		dstadr[NI_MAXHOST];
+	char		dstaddr[NI_MAXHOST];
 	char		resultbuf[NTPQ_BUFLEN];
 
 	if (assoc_index < 0 || assoc_index >= (int)numassoc)
@@ -717,17 +717,17 @@ ntpq_get_assoc_clocktype(
 
 	associd = assoc_cache[assoc_index].assid;
 	if (associd == peervar_assoc) {
-		rc = ntpq_get_peervar("dstadr", dstadr, sizeof(dstadr));
+		rc = ntpq_get_peervar("dstaddr", dstaddr, sizeof(dstaddr));
 	} else {
 		i = ntpq_read_assoc_peervars(associd, resultbuf,
 					     sizeof(resultbuf));
 		if (i <= 0)
 			return -1;
-		rc = ntpq_getvar(resultbuf, i, "dstadr", dstadr,
-				 sizeof(dstadr));
+		rc = ntpq_getvar(resultbuf, i, "dstaddr", dstaddr,
+				 sizeof(dstaddr));
 	}
 
-	if (0 != rc && decodenetnum(dstadr, &dum_store))
+	if (0 != rc && decodenetnum(dstaddr, &dum_store))
 		return ntpq_decodeaddrtype(&dum_store);
 
 	return -1;


=====================================
ntpq/ntpq-subs.c
=====================================
--- a/ntpq/ntpq-subs.c
+++ b/ntpq/ntpq-subs.c
@@ -165,10 +165,10 @@ struct xcmd opcmds[] = {
 	  "obtain and print a list of all peers and clients [IP version]" },
 	{ "opeers", opeers,     { OPT|IP_VERSION, NO, NO, NO },
 	  { "-4|-6", "", "", "" },
-	  "print peer list the old way, with dstadr shown rather than refid [IP version]" },
+	  "print peer list the old way, with dstaddr shown rather than refid [IP version]" },
 	{ "lopeers", lopeers,   { OPT|IP_VERSION, NO, NO, NO },
 	  { "-4|-6", "", "", "" },
-	  "obtain and print a list of all peers and clients showing dstadr [IP version]" },
+	  "obtain and print a list of all peers and clients showing dstaddr [IP version]" },
 	{ ":config", config,   { NTP_STR, NO, NO, NO },
 	  { "<configuration command line>", "", "", "" },
 	  "send a remote configuration command to ntpd" },
@@ -1532,7 +1532,7 @@ decodeaddrtype(
  */
 struct varlist opeervarlist[] = {
 	{ "srcaddr",	0 },	/* 0 */
-	{ "dstadr",	0 },	/* 1 */
+	{ "dstaddr",	0 },	/* 1 */
 	{ "stratum",	0 },	/* 2 */
 	{ "hpoll",	0 },	/* 3 */
 	{ "ppoll",	0 },	/* 4 */
@@ -1607,17 +1607,17 @@ doprintpeers(
 	int c;
 	int len;
 	bool have_srchost;
-	bool have_dstadr;
+	bool have_dstaddr;
 	bool have_da_rid;
 	bool have_jitter;
 	sockaddr_u srcaddr;
-	sockaddr_u dstadr;
+	sockaddr_u dstaddr;
 	sockaddr_u dum_store;
 	sockaddr_u refidadr;
 	long hmode = 0;
 	u_long srcport = 0;
 	uint32_t u32;
-	const char *dstadr_refid = "0.0.0.0";
+	const char *dstaddr_refid = "0.0.0.0";
 	const char *serverlocal;
 	size_t drlen;
 	u_long stratum = 0;
@@ -1639,11 +1639,11 @@ doprintpeers(
 	get_systime(&ts);
 	
 	have_srchost = false;
-	have_dstadr = false;
+	have_dstaddr = false;
 	have_da_rid = false;
 	have_jitter = false;
 	ZERO_SOCK(&srcaddr);
-	ZERO_SOCK(&dstadr);
+	ZERO_SOCK(&dstaddr);
 	clock_name[0] = '\0';
 	ZERO(estoffset);
 	ZERO(estdelay);
@@ -1669,14 +1669,14 @@ doprintpeers(
 					have_srchost = true;
 				}
 			}
-		} else if (!strcmp("dstadr", name)) {
+		} else if (!strcmp("dstaddr", name)) {
 			if (decodenetnum(value, &dum_store)) {
 				type = decodeaddrtype(&dum_store);
-				have_dstadr = true;
-				dstadr = dum_store;
+				have_dstaddr = true;
+				dstaddr = dum_store;
 				if (pvl == opeervarlist) {
 					have_da_rid = true;
-					dstadr_refid = trunc_left(stoa(&dstadr), 15);
+					dstaddr_refid = trunc_left(stoa(&dstaddr), 15);
 				}
 			}
 		} else if (!strcmp("hmode", name)) {
@@ -1686,19 +1686,19 @@ doprintpeers(
 				have_da_rid = true;
 				drlen = strlen(value);
 				if (0 == drlen) {
-					dstadr_refid = "";
+					dstaddr_refid = "";
 				} else if (drlen <= 4) {
 					ZERO(u32);
 					memcpy(&u32, value, drlen);
-					dstadr_refid = refid_str(u32, 1);
+					dstaddr_refid = refid_str(u32, 1);
 				} else if (decodenetnum(value, &refidadr)) {
 					if (SOCK_UNSPEC(&refidadr))
-						dstadr_refid = "0.0.0.0";
+						dstaddr_refid = "0.0.0.0";
 					else if (ISREFCLOCKADR(&refidadr))
-						dstadr_refid =
+						dstaddr_refid =
 						    refnumtoa(&refidadr);
 					else
-						dstadr_refid =
+						dstaddr_refid =
 						    stoa(&refidadr);
 				} else {
 					have_da_rid = false;
@@ -1707,17 +1707,17 @@ doprintpeers(
 				have_da_rid = true;
 				drlen = strlen(value);
 				if (0 == drlen) {
-					dstadr_refid = "";
+					dstaddr_refid = "";
 				} else if (drlen <= 4) {
 					ZERO(u32);
 					memcpy(&u32, value, drlen);
-					dstadr_refid = refid_str(u32, 1);
+					dstaddr_refid = refid_str(u32, 1);
 					//fprintf(stderr, "apeervarlist S1 refid: value=<%s>\n", value);
 				} else if (decodenetnum(value, &refidadr)) {
 					if (SOCK_UNSPEC(&refidadr))
-						dstadr_refid = "0.0.0.0";
+						dstaddr_refid = "0.0.0.0";
 					else if (ISREFCLOCKADR(&refidadr))
-						dstadr_refid =
+						dstaddr_refid =
 						    refnumtoa(&refidadr);
 					else {
 						char *buf = emalloc(10);
@@ -1725,7 +1725,7 @@ doprintpeers(
 
 						snprintf(buf, 10,
 							"%0x", i);
-						dstadr_refid = buf;
+						dstaddr_refid = buf;
 					//fprintf(stderr, "apeervarlist refid: value=<%x>\n", i);
 					}
 					//fprintf(stderr, "apeervarlist refid: value=<%s>\n", value);
@@ -1816,8 +1816,8 @@ doprintpeers(
 		c = flash2[CTL_PEER_STATVAL(rstatus) & 0x3];
 	if (numhosts > 1) {
 		if ((pvl == peervarlist || pvl == apeervarlist)
-		    && have_dstadr) {
-			serverlocal = nntohost_col(&dstadr,
+		    && have_dstaddr) {
+			serverlocal = nntohost_col(&dstaddr,
 			    (size_t)min(LIB_BUFLENGTH - 1, maxhostlen),
 			    true);
 		} else {
@@ -1840,8 +1840,8 @@ doprintpeers(
 		if (!have_da_rid) {
 			drlen = 0;
 		} else {
-			drlen = strlen(dstadr_refid);
-			makeascii(drlen, dstadr_refid, fp);
+			drlen = strlen(dstaddr_refid);
+			makeascii(drlen, dstaddr_refid, fp);
 		}
 		if (pvl == apeervarlist) {
 			while (drlen++ < 9)


=====================================
ntpq/ntpq.c
=====================================
--- a/ntpq/ntpq.c
+++ b/ntpq/ntpq.c
@@ -115,7 +115,7 @@ const var_format cookedvars[] = {
 	{ "flash",		FX },
 	{ "srcaddr",		HA },
 	{ "peeradr",		HA },	/* compat with others */
-	{ "dstadr",		NA },
+	{ "dstaddr",		NA },
 	{ "filtdelay",		AR },
 	{ "filtoffset",		AR },
 	{ "filtdisp",		AR },


=====================================
tests/perl/ntptrace.t
=====================================
--- a/tests/perl/ntptrace.t
+++ b/tests/perl/ntptrace.t
@@ -57,7 +57,7 @@ stdout_is(
 push @vars, {
     srcaddr     => '1.2.3.4',
     srcport    => '123',
-    dstadr     => '192.168.1.11',
+    dstaddr     => '192.168.1.11',
     dstport    => '123',
     leap       => '00',
     stratum    => '2',



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/6364b8c86bcf820894f6619d35ab4938ae5628f0
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ntpsec.org/pipermail/vc/attachments/20151205/60f94aef/attachment.html>


More information about the vc mailing list