[BusyBox] Re: busybox/util-linux rdate.c,1.31,1.32
Glenn McGrath
bug1 at iinet.net.au
Sun Jan 18 21:44:46 UTC 2004
> Now, RFC868 allows both UDP and TCP implementations of the time
> protocol so this may not work if someone defines a udp time service
> other than 37 but who would do that?
>
> - s_in.sin_port = bb_lookup_port("time", 37);
> + s_in.sin_port = bb_lookup_port("time", "tcp", 37);
If the protocol is set to NULL, getservbyname will match any protocol,
so it should resolve for tcp or udp.
- s_in.sin_port = bb_lookup_port("time", "tcp", 37);
+ s_in.sin_port = bb_lookup_port("time", NULL, 37);
Untested
Glenn
More information about the busybox
mailing list