ppp authentication bug fixes
cover ppp authentication bug fixes
Here are a couple bug fixes for the PPP authentication. First patch fixes the seg fault when the secret is empty, as reported by marcel. Second, if we do fail to authenticate, we need to change ppp phases to terminate the link.
Kristen Carlson Accardi (2):
ppp: allow empty secret for chap challenge
ppp: send PPP_FAIL when authentication fails
gatchat/ppp_auth.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-)
PATCH 1/2 ppp: allow empty secret for chap challenge
Just do a checksum over the identifier if we have an empty password for our chap secret.
--- gatchat/ppp_auth.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
gatchat/ppp_auth.c +2 -1
@@ -83,7 +83,8 @@ static void chap_process_challenge(struct auth_data *auth, guint8 *packet)if (!checksum)return ;g_checksum_update (checksum, &header->identifier,1 ); -g_checksum_update (checksum, (guchar *) secret,strlen (secret)); +if (secret) +g_checksum_update (checksum, (guchar *) secret,strlen (secret));g_checksum_update (checksum, &header->data[1 ], header->data[0 ]);/* transmit a response packet */
Signature · 1 line
1.6.6.1
PATCH 2/2 ppp: send PPP_FAIL when authentication fails
In reply to Kristen Carlson Accardi--- gatchat/ppp_auth.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
gatchat/ppp_auth.c +2 -1
@@ -128,7 +128,8 @@ static void chap_process_failure(struct auth_data *data, guint8 *packet) {struct chap_header *header = (struct chap_header *) packet; -g_print ("Failed to authenticate, message %s\n" , header->data); +ppp_generate_event (data->ppp,PPP_FAIL ); +g_printerr ("Failed to authenticate, message %s\n" , header->data); }/*
Signature · 1 line
1.6.6.1
Hi Kristen,
Quoted 11 lines
Here are a couple bug fixes for the PPP authentication. First patch fixes the seg fault when the secret is empty, as reported by marcel. Second, if we do fail to authenticate, we need to change ppp phases to terminate the link.
Kristen Carlson Accardi (2):
ppp: allow empty secret for chap challenge
ppp: sendPPP_FAILwhen authentication failsgatchat/ppp_auth.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-)
I am still not seeing patch 1/2. Can you re-sent both patches.
Regards
Marcel