Skip to content

eppp_link 1.0.1 CONFIG_EPPP_LINK_USES_PPP forcibly enables PPP server, causing local IP assignment and MQTT connect failures (IDFGH-16352) #873

@kadir-guzel

Description

@kadir-guzel

Answers checklist.

  • I have read the documentation for esp-protocols components and the issue is not addressed there.
  • I have updated my esp-protocols branch (master or release) to the latest version and checked that the issue is present there.
  • I have searched the issue tracker for a similar issue and not found a similar issue.

General issue report

Bug description:
I discovered this issue while running the host example of eppp_link. When enabling CONFIG_EPPP_LINK_USES_PPP, the Kconfig automatically enables CONFIG_LWIP_PPP_SERVER_SUPPORT and doesn’t allow the user to disable it via menuconfig.

This causes esp_netif_lwip_ppp.c to assign a local IP address to the device. As a result, the MQTT client attempts to connect using this local IP instead of the expected IP from the PPP peer (e.g., modem), and the connection fails with esp-tls errors.

Steps to reproduce:

  1. Open the host example of eppp_link.
  2. Enable CONFIG_EPPP_LINK_USES_PPP in menuconfig.
  3. Build and run the example.
  4. Observe that CONFIG_LWIP_PPP_SERVER_SUPPORT is automatically enabled.
  5. Application receives local IP from esp_netif_lwip_ppp.c.
  6. MQTT connection fails since it tries to use that local IP.

Observed log snippet:

ip4_output_if: call netif->output()
pppos_netif_output[1]: proto=0x21, len = 44
...
|  192  |  168  |  11  |  2  | (src) // local ip from esp_netif_lwip_ppp.c
...
E (591827) esp-tls: [sock=54] select() timeout
E (591827) esp-tls: Failed to open new connection
E (591827) mqtt_client: Error transport connect

Expected behavior:

  • CONFIG_LWIP_PPP_SERVER_SUPPORT should not be automatically forced when CONFIG_EPPP_LINK_USES_PPP is selected.
  • User should be able to choose client/server PPP mode explicitly.
  • For PPP client use-cases, the IP assignment should come from the PPP peer, not from esp_netif_lwip_ppp.c.

Proposed fix:

  • Remove the hard dependency in Kconfig so CONFIG_LWIP_PPP_SERVER_SUPPORT can be disabled.
  • Allow EPPP_LINK_USES_PPP to work in PPP client mode without assigning a local IP from esp_netif_lwip_ppp.c.

Additional context:
Tested on ESP32-S3 using the host example. This issue affects any project that enables CONFIG_EPPP_LINK_USES_PPP, not just the example.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions