Sorry for the delay response, the patch works; however, it segfaults if the input to -p is malformed. For example, "busybox ntpd -k /etc/ntp/keys -p keyno:192.168.1.1 -d -n -q". Also, it seems like the book keeping for determine whether a key is used or not and free unused entries isn't worth it. Typically, you'll only have a single key entry.
On Fri, Oct 26, 2018 at 5:10 PM Denys Vlasenko <[email protected]> wrote: > On Fri, Oct 26, 2018 at 7:01 PM Denys Vlasenko <[email protected]> > wrote: > > On Tue, Oct 16, 2018 at 9:49 PM Brandon Enochs <[email protected]> > wrote: > > > //usage: "\n -p PEER Obtain time from PEER (may be > repeated)" > > > +//usage: "\n -K key number for preceding PEER (may be > repeated)" > > > +//usage: "\n -k key file (see man 5 ntp.keys)" > > > > The interplay between -p and -K is rather hard to code. > > > > Since -p is busybox's invention anyway, there is no compatibility > > to support, and we can, say, just include keys into -p ARG. > > Then we don't need -K. > > > > Brainstorming. How about -p [ALGO:KEYNO:]PEER ? > > > > Also, code which parses of "server" lines in /etc/ntp.conf > > probably needs to be extended to understand "key KEYNO" arg? > > Here's the code attached. Can you try it? >
_______________________________________________ busybox mailing list [email protected] http://lists.busybox.net/mailman/listinfo/busybox
