From eef8e67ea7cae677fe1320e1b82b038b84f3266e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=B6ran=20Weinholt?= Date: Mon, 17 Feb 2020 12:38:21 +0100 Subject: [PATCH] net: ppp: ipcp: do not require a peer address MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It is not unusual that the peer does not provide an IP address in the ipcp negotiation. But because ppp is a peer-to-peer protocol, we do not actually need to know the peer's address to use the network. Signed-off-by: Göran Weinholt --- subsys/net/l2/ppp/ipcp.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/subsys/net/l2/ppp/ipcp.c b/subsys/net/l2/ppp/ipcp.c index d5901f158eb..152732a2cbe 100644 --- a/subsys/net/l2/ppp/ipcp.c +++ b/subsys/net/l2/ppp/ipcp.c @@ -183,8 +183,11 @@ static int ipcp_config_info_req(struct ppp_fsm *fsm, ctx = CONTAINER_OF(fsm, struct ppp_context, ipcp.fsm); if (address_option_idx < 0) { - /* Address option was not present */ - return -EINVAL; + /* The address option was not present, but we + * can continue without it. */ + NET_DBG("[%s/%p] No %saddress provided", + fsm->name, fsm, "peer "); + return PPP_CONFIGURE_ACK; } code = PPP_CONFIGURE_ACK;