Commit Graph

26 Commits

Author SHA1 Message Date
Denis Kenzior 8edaaaf210 gatchat: Fix up minor coding style issues 2014-06-21 11:54:26 -05:00
Philip Paeps a88662d23c 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.
2014-06-21 11:50:34 -05:00
Denis Kenzior a1010dd727 gatchat: Fix minor style issue 2011-11-14 20:11:39 -06:00
Marcel Holtmann 21f9da9916 gatchat: Update copyright information 2011-10-10 13:39:25 -07:00
Denis Kenzior 2eb4611de8 ppp: Add basic length sanity checks 2011-06-29 05:00:56 -05:00
Caiwen Zhang 65d65f4fbe gatppp: add name field when using chap auth
Some systems require name field, otherwise chap authentication will
fail.
2011-05-11 20:24:35 -05:00
Denis Kenzior 57f32ff899 ppp: Remove some g_prints 2011-02-28 16:13:56 -06:00
Lucas De Marchi 521071a785 gatchat: explicitly compare pointers to NULL
This patch was generated by the following semantic patch
(http://coccinelle.lip6.fr/)

// <smpl>
@fix disable is_null,isnt_null1@
expression *E;
@@

- !E
+ E == NULL
// </smpl>
2010-11-29 12:05:29 -06:00
Kristen Carlson Accardi 3fff4c49c8 ppp: implement ppp_packet_new 2010-05-19 02:58:45 -05:00
Kristen Carlson Accardi 125fc62526 ppp: set address and control field
Before sending to hdlc, set the address and control field.
Fix hardcode of ppp header size.
2010-05-10 16:27:15 -05:00
Denis Kenzior 87340d64e2 ppp: Make ppp_chap_process_packet const correct 2010-04-28 17:27:35 -05:00
Kristen Carlson Accardi 60643ee287 ppp: nak unknown auth protocol
If we are sent a Config-Request for an auth proto other than
CHAP with MD5, send a NAK.
2010-04-14 17:16:03 -05:00
Denis Kenzior 18e5e26acb ppp: Remove auth_ functions from ppp_auth.c
These really serve no purpose right now as we use only CHAP.  So they
only take up space and make the code harder to read.  If we implement
1-3 auth protocols, then they're easier handled inside gatppp.c.  If we
have more, then a proper auth driver framework is required.
2010-04-13 14:21:16 -05:00
Marcel Holtmann c2fb0a1630 Move PPP constants where they are used 2010-04-03 22:32:27 -07:00
Denis Kenzior ebc6e3b9dc Refactor: Get rid of (now) pointless comments 2010-04-02 19:03:56 -05:00
Denis Kenzior 2c466c8baf Refactor: Get rid of packet handler registrations
There are only about 4 protocols that the current ppp code handles and
it is doubtful that it will grow much more.  There's no point in having
an extensive packet handler registration framework.
2010-04-02 15:11:48 -05:00
Marcel Holtmann 76200165bb Add more missing break statements 2010-04-02 13:33:35 -07:00
Marcel Holtmann dc55d14e9c Add some debugging information to PPP authentication handling 2010-04-01 09:56:18 -07:00
Marcel Holtmann cb26fc4a03 Fix use of g_checksum_get_digest() inout argument 2010-03-29 18:13:01 -07:00
Kristen Carlson Accardi ee294d35b8 ppp: send PPP_FAIL when authentication fails 2010-03-26 23:00:28 -05:00
Marcel Holtmann fb043af678 Allow empty secrets for CHAP authentication 2010-03-26 19:35:54 -07:00
Kristen Carlson Accardi efb95941be fix memory leak in ppp_auth
Free packet after calling ppp_transmit()
2010-03-24 13:21:32 -07:00
Marcel Holtmann 39476a2b54 Use password instead of passwd as variable name 2010-03-22 20:13:55 -07:00
Marcel Holtmann 6cbfe5fa1e The g_free() function checks for NULL pointers
And so does even the free() function from glibc ;)
2010-03-22 20:10:17 -07:00
Marcel Holtmann 91b742730a Some additional whitespace cleanup for PPP code 2010-03-22 20:01:28 -07:00
Kristen Carlson Accardi 6cb22fe096 CHAP with MD5 authentication support
Authentication support with CHAP and MD5
2010-03-22 17:28:23 -07:00