Merge branch 'fix/netif_ppp_server_negotiate_own_addr_v5.3' into 'release/v5.3'

fix(esp_netif): Fix PPP server to negotiate its own address is configured (v5.3)

See merge request espressif/esp-idf!48828
This commit is contained in:
Euripedes Rocha
2026-05-25 12:25:38 +02:00
@@ -256,6 +256,10 @@ esp_err_t esp_netif_start_ppp(esp_netif_t *esp_netif)
// Set our preferred address, and accept the remote // Set our preferred address, and accept the remote
ppp_ctx->ppp->ipcp_wantoptions.ouraddr = ppp_ctx->ppp_our_ip4_addr.addr; ppp_ctx->ppp->ipcp_wantoptions.ouraddr = ppp_ctx->ppp_our_ip4_addr.addr;
ppp_ctx->ppp->ipcp_wantoptions.accept_remote = 1; ppp_ctx->ppp->ipcp_wantoptions.accept_remote = 1;
ppp_ctx->ppp->ask_for_local = 1; /* `ask_for_local` option in the lwip's pcb is `0` by default and causes
* the initial negotiation IPCP request to reset our own address to '0.0.0.0'.
* https://github.com/lwip-tcpip/lwip/blob/1cc1536e/src/netif/ppp/ipcp.c#L728-L729
*/
} }
if (ppp_ctx->ppp_their_ip4_addr.addr != IPADDR_ANY) { if (ppp_ctx->ppp_their_ip4_addr.addr != IPADDR_ANY) {
// Set their preferred address, and accept the local // Set their preferred address, and accept the local