All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH ppp] ppp: Apply configuration options from a DCE request if ACK it
@ 2021-01-01 21:04 s.e.golubtsov
  2021-01-04 17:20 ` Denis Kenzior
  0 siblings, 1 reply; 2+ messages in thread
From: s.e.golubtsov @ 2021-01-01 21:04 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 962 bytes --]

From: Sergei Golubtsov <s.e.golubtsov@gmail.com>

Apply configuration options if the DCE sends a PPP LCP configure request
and the DTE is going to ACK the request. Otherwise some options such as
the ACCM may not correspond to the configuration negotiated with the
DCE.
---
 gatchat/ppp_cp.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/gatchat/ppp_cp.c b/gatchat/ppp_cp.c
index f3f2cc4f..371055e4 100644
--- a/gatchat/ppp_cp.c
+++ b/gatchat/ppp_cp.c
@@ -660,9 +660,12 @@ static void pppcp_generate_event(struct pppcp_data *data,
 	if (actions & SCR)
 		pppcp_send_configure_request(data);
 
-	if (actions & SCA)
+	if (actions & SCA) {
+		/* Apply local options */
+		if (data->driver->rca)
+			data->driver->rca(data, packet);
 		pppcp_send_configure_ack(data, packet);
-	else if (actions & SCN)
+	} else if (actions & SCN)
 		pppcp_send_configure_nak(data, packet);
 
 	if (actions & STR)
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-01-04 17:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-01 21:04 [PATCH ppp] ppp: Apply configuration options from a DCE request if ACK it s.e.golubtsov
2021-01-04 17:20 ` Denis Kenzior

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.