ppp/ppp-2.4.9-pppd-eap-Fix-bug-causing-incorrect-response-length-3.patch
Marcin Zajączkowski 8c079e9264 Backport patches from master for SSTP and EAP-TLS
With those changes will allow pppd to connect to an Azure VnetGWay using SSTP
(or using EAP-TLS to a Windows RAS server). Backport to Fedora endorsed
by Eivind Næss, their author and the author of sstp-client and
network-manager-sstp.

Links to git commits used to generate patches:
e609ed8bb6
d706c95906
d7e62a8499
(the first one is only needed to make the second apply in the original
form from Git - those changed lines are removed anyway)
2022-04-05 23:45:18 +02:00

33 lines
1.0 KiB
Diff

From d7e62a8499c4032d79e05afbd8fd3efd51c5b148 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Eivind=20N=C3=A6ss?= <eivnaes@yahoo.com>
Date: Thu, 3 Feb 2022 14:28:22 -0800
Subject: [PATCH] pppd/eap: Fix bug causing incorrect response length (#334)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Need to update the esp->ea_client.ea_namelen variable. A plugin can override the
name of the user, and the variable is passed onto the eap_chap2_response generating
the wrong response length.
Signed-off-by: Eivind Næss <eivnaes@yahoo.com>
---
pppd/eap.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/pppd/eap.c b/pppd/eap.c
index 54c3d42..6cb595f 100644
--- a/pppd/eap.c
+++ b/pppd/eap.c
@@ -2182,6 +2182,7 @@ eap_request(eap_state *esp, u_char *inp, int id, int len)
eap_send_nak(esp, id, EAPT_SRP);
break;
}
+ esp->es_client.ea_namelen = strlen(esp->es_client.ea_name);
/* Create the MSCHAPv2 response (and add to cache) */
unsigned char response[MS_CHAP2_RESPONSE_LEN+1]; // VLEN + VALUE
--
2.34.1