Only send in hacky case

This commit is contained in:
Tassilo Schweyer 2025-05-05 00:52:28 +02:00
parent 225ac28120
commit 2b13f59f6a

View file

@ -5074,15 +5074,7 @@ void processudp(uint8_t *buf, int len, struct sockaddr_in *addr, uint16_t indexu
LOG(3, s, t, "Reusing LCP negotiation\n"); LOG(3, s, t, "Reusing LCP negotiation\n");
// Start with proxy auth id to avoid client caching challenge responses // Start with proxy auth id to avoid client caching challenge responses
sess_local[s].auth_id = authid; sess_local[s].auth_id = authid;
if (authchalln <= 16) {
memcpy(sess_local[s].auth_chall, authchall, authchalln);
}
if (authrespn <= 64) {
memcpy(sess_local[s].auth_resp, authresp, authrespn);
}
if (atype != 0) {
sess_local[s].auth_type = atype;
}
strncpy(sess_local[s].auth_name, authname, sizeof(sess_local[s].auth_name) - 1); strncpy(sess_local[s].auth_name, authname, sizeof(sess_local[s].auth_name) - 1);
if (strstr(authname, "umts")) { if (strstr(authname, "umts")) {
if (last_sent_lcp_confreq_n) { if (last_sent_lcp_confreq_n) {
@ -5093,6 +5085,15 @@ void processudp(uint8_t *buf, int len, struct sockaddr_in *addr, uint16_t indexu
sess_local[s].lcp_last_received_confreq_n = last_received_lcp_confreq_n; sess_local[s].lcp_last_received_confreq_n = last_received_lcp_confreq_n;
memcpy(sess_local[s].lcp_last_received_confreq, last_received_lcp_confreq, last_sent_lcp_confreq_n); memcpy(sess_local[s].lcp_last_received_confreq, last_received_lcp_confreq, last_sent_lcp_confreq_n);
} }
if (authchalln <= 16) {
memcpy(sess_local[s].auth_chall, authchall, authchalln);
}
if (authrespn <= 64) {
memcpy(sess_local[s].auth_resp, authresp, authrespn);
}
if (atype != 0) {
sess_local[s].auth_type = atype;
}
} }
if (!sess_local[s].lcp_authtype) if (!sess_local[s].lcp_authtype)