Add option '-a' to ppp server: don't request authentication from client. Reference: /n/sources/patch/applied/ppp-noauth Date: Mon Aug 6 17:24:59 CES 2012 Signed-off-by: miller@hamnavoe.com --- /sys/src/cmd/ip/ppp/ppp.c Mon Aug 6 17:23:10 2012 +++ /sys/src/cmd/ip/ppp/ppp.c Mon Aug 6 17:23:04 2012 @@ -17,6 +17,7 @@ static int pppframing = 1; static int noipcompress; static int server; +static int noauth; static int nip; /* number of ip interfaces */ static int dying; /* flag to signal to all threads its time to go */ static int primary; /* this is the primary IP interface */ @@ -332,7 +333,7 @@ if(p->proto == Plcp) { if(state == Sopened) - setphase(ppp, Pauth); + setphase(ppp, noauth? Pnet : Pauth); else if(state == Sclosed) setphase(ppp, Pdead); else if(p->state == Sopened) @@ -355,7 +356,7 @@ } if(p->proto == Pipcp && state == Sopened) { - if(server && ppp->chap->state != Cauthok) + if(server && !noauth && ppp->chap->state != Cauthok) abort(); err = ipopen(ppp); @@ -2658,7 +2659,7 @@ void usage(void) { - fprint(2, "usage: ppp [-cCdfPSu] [-b baud] [-k keyspec] [-m mtu] [-p dev] [-s username] [-x netmntpt] [-t modemcmd] [local-addr [remote-addr]]\n"); + fprint(2, "usage: ppp [-CPSacdfu] [-b baud] [-k keyspec] [-m mtu] [-M chatfile] [-p dev] [-x netmntpt] [-t modemcmd] [local-addr [remote-addr]]\n"); exits("usage"); } @@ -2691,6 +2692,9 @@ modemcmd = nil; ARGBEGIN{ + case 'a': + noauth = 1; + break; case 'b': baud = atoi(EARGF(usage())); if(baud < 0) --- /sys/man/8/ppp Mon Aug 6 17:23:15 2012 +++ /sys/man/8/ppp Mon Aug 6 17:23:12 2012 @@ -4,7 +4,7 @@ .SH SYNOPSIS .B ip/ppp [ -.B -CPScdfu +.B -CPSacdfu ] [ .B -b .I baud @@ -113,6 +113,9 @@ specify a communications device, usually a serial line with a modem. .PP PPP supports the following options: +.TP +.B a +as server, don't request authentication from the client .TP .B b set the baud rate on the communications device