[BusyBox] RDATE function
Randall F Banner
rfbanner at duke-energy.com
Thu Sep 27 11:08:19 UTC 2001
Yup, that was the problem alright! I put the port 37 tcp and udp
definitions in my (very scaled down) "services" file and it works like a
champ. I'll try the patch later when I have more time. Thanks for your
help!!
Matt Kraai
<kraai at alumni.carnegieme To: Randall F Banner <rfbanner at duke-energy.com>
llon.edu> cc: busybox at busybox.net
Sent by: bcc:
busybox-admin at opensource Subject: Re: [BusyBox] RDATE function
.lineo.com
09/27/01 11:55 AM
On Thu, Sep 27, 2001 at 09:29:42AM -0400, Randall F Banner wrote:
> Is the RDATE function broken? This is what I get when I try it:
>
>
> #busybox
> BusyBox v0.60.1 (2001.09.21-19:55+0000) multi-call binary
>
> Usage: busybox [function] [arguments]...
> or: [function] [arguments]...
>
> <stuff deleted here>
>
> #busybox rdate -p time-a.nist.gov
> rdate: time: No such file or directory
> #
You do not have an entry for the time port in /etc/services.
Could you please test the following patch and let us know if it
works?
Matt
Index: rdate.c
===================================================================
RCS file: /var/cvs/busybox/rdate.c,v
retrieving revision 1.19
diff -u -r1.19 rdate.c
--- rdate.c 2001/07/30 14:43:20 1.19
+++ rdate.c 2001/09/27 15:51:30
@@ -48,7 +48,7 @@
h = xgethostbyname(host); /* get the IP addr */
if ((tserv = getservbyname("time", "tcp")) == NULL) /* find
port # */
- perror_msg_and_die("time");
+ tserv->s_port = ntohl(37);
if ((fd = socket(AF_INET, SOCK_STREAM, 0)) < 0) /* get net
connection */
perror_msg_and_die("socket");
_______________________________________________
busybox mailing list
busybox at busybox.net
http://busybox.net/mailman/listinfo/busybox
More information about the busybox
mailing list