gatchat: implement PAP authentication
authorPhilip Paeps <philip@paeps.cx>
Thu, 19 Jun 2014 10:07:05 +0000 (12:07 +0200)
committerDenis Kenzior <denkenz@gmail.com>
Sat, 21 Jun 2014 16:50:34 +0000 (11:50 -0500)
commita88662d23c45f49d9af5a508d4d0a778950b2420
tree493246fd2c2789995a6530ca8f379e6a4ed402c8
parent1dd85809307b200bfe87e6a71c68fa244cb15bc6
gatchat: implement PAP authentication

Make the authentication method configurable, CHAP or PAP, defaulting to
CHAP (i.e.: previous behaviour).

Implementation details:

 o If PAP is configured, we NAK the CHAP authentication protocol option
   in LCP configuration requests and suggest PAP instead.  This works
   around the amusing requirement of 3GPP TS 29.061 that modems must
   send a forced positive acknowledgement of the authentication method
   tried (i.e.: the modem will successfully accept any CHAP handshake,
   but if the network only supports PAP, the modem will hang up
   when it tries and fails to activate the PDP context)

 o The PAP Authenticate-Request is resent a hard-coded three times at
   ten-second intervals.  This may be a bit too persistent.  Chances
   are if it doesn't work the first time, it'll never work, but the
   RFC insists that we MUST retry.
gatchat/gatppp.c
gatchat/gatppp.h
gatchat/ppp.h
gatchat/ppp_auth.c
gatchat/ppp_lcp.c