summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAngelos D. Keromytis <angelos@cvs.openbsd.org>1998-03-20 03:12:17 +0000
committerAngelos D. Keromytis <angelos@cvs.openbsd.org>1998-03-20 03:12:17 +0000
commitccd53af02feaf7af1a291bfbd3eaf9bca71fcdad (patch)
treebc7bbd09c9d4e902d2f0daecd08dd345c7ae63e3
parent41c3319c5da4d222769781ed13de2caf7cb80433 (diff)
Aliases.
-rw-r--r--usr.sbin/timed/timed/timed.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/usr.sbin/timed/timed/timed.c b/usr.sbin/timed/timed/timed.c
index e17ffe62741..678a45f128c 100644
--- a/usr.sbin/timed/timed/timed.c
+++ b/usr.sbin/timed/timed/timed.c
@@ -42,7 +42,7 @@ static char sccsid[] = "@(#)timed.c 5.1 (Berkeley) 5/11/93";
#endif /* not lint */
#ifdef sgi
-#ident "$Revision: 1.5 $"
+#ident "$Revision: 1.6 $"
#endif /* sgi */
#define TSPTYPES
@@ -434,7 +434,7 @@ main(int argc, char **argv)
continue;
}
-
+ ((struct sockaddr_in *)&ifr->ifr_addr)->sin_addr = ntp->my_addr;
if (ioctl(sock, SIOCGIFNETMASK, (char *)&ifreq) < 0) {
perror("get netmask");
continue;
@@ -443,6 +443,8 @@ main(int argc, char **argv)
&ifreq.ifr_addr)->sin_addr.s_addr;
if (ifreqf.ifr_flags & IFF_BROADCAST) {
+ ((struct sockaddr_in *)&ifr->ifr_addr)->sin_addr =
+ ntp->my_addr;
if (ioctl(sock, SIOCGIFBRDADDR, (char *)&ifreq) < 0) {
perror("get broadaddr");
continue;
@@ -452,7 +454,9 @@ main(int argc, char **argv)
* So we cannot just mask ntp->dest_addr. */
ntp->net = ntp->my_addr;
ntp->net.s_addr &= ntp->mask;
- } else {
+ } else {
+ ((struct sockaddr_in *)&ifr->ifr_addr)->sin_addr =
+ ntp->my_addr;
if (ioctl(sock, SIOCGIFDSTADDR,
(char *)&ifreq) < 0) {
perror("get destaddr");