From 653328ba0757f0ce05e8e29e87c0a36cda438d19 Mon Sep 17 00:00:00 2001 From: David Cermak Date: Mon, 18 Aug 2025 08:19:43 +0200 Subject: [PATCH 1/2] fix(eppp): Support for IPv4-only mode Closes https://github.com/espressif/esp-protocols/issues/864 --- components/eppp_link/eppp_netif_tun.c | 12 ++++++++++-- .../eppp_link/examples/slave/sdkconfig.ci.ipv4_only | 1 + 2 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 components/eppp_link/examples/slave/sdkconfig.ci.ipv4_only diff --git a/components/eppp_link/eppp_netif_tun.c b/components/eppp_link/eppp_netif_tun.c index 32d656bc0..63c0896d9 100644 --- a/components/eppp_link/eppp_netif_tun.c +++ b/components/eppp_link/eppp_netif_tun.c @@ -65,12 +65,13 @@ static err_t tun_output_v4(struct netif *netif, struct pbuf *p, const ip4_addr_t LWIP_UNUSED_ARG(ipaddr); return tun_output(netif, p); } +#if LWIP_IPV6 static err_t tun_output_v6(struct netif *netif, struct pbuf *p, const ip6_addr_t *ipaddr) { LWIP_UNUSED_ARG(ipaddr); return tun_output(netif, p); } - +#endif static err_t tun_init(struct netif *netif) { if (netif == NULL) { @@ -151,9 +152,12 @@ static void cmd_ping_on_ping_end(esp_ping_handle_t hdl, void *args) } if (IP_IS_V4(&target_addr)) { ESP_LOGD(TAG, "\n--- %s ping statistics ---\n", inet_ntoa(*ip_2_ip4(&target_addr))); - } else { + } +#if LWIP_IPV6 + else { ESP_LOGD(TAG, "\n--- %s ping statistics ---\n", inet6_ntoa(*ip_2_ip6(&target_addr))); } +#endif ESP_LOGI(TAG, "%" PRIu32 " packets transmitted, %" PRIu32 " received, %" PRIu32 "%% packet loss, time %" PRIu32 "ms\n", transmitted, received, loss, total_time_ms); esp_ping_delete_session(hdl); @@ -168,7 +172,11 @@ esp_err_t eppp_check_connection(esp_netif_t *netif) ip_addr_t target_addr = {0}; esp_netif_ip_info_t ip; esp_netif_get_ip_info(netif, &ip); +#if LWIP_IPV6 target_addr.u_addr.ip4.addr = ip.gw.addr; +#else + target_addr.addr = ip.gw.addr; +#endif config.target_addr = target_addr; esp_ping_callbacks_t cbs = { .cb_args = netif, diff --git a/components/eppp_link/examples/slave/sdkconfig.ci.ipv4_only b/components/eppp_link/examples/slave/sdkconfig.ci.ipv4_only new file mode 100644 index 000000000..4628764ab --- /dev/null +++ b/components/eppp_link/examples/slave/sdkconfig.ci.ipv4_only @@ -0,0 +1 @@ +CONFIG_LWIP_IPV6=n From c91578c827e7267519bc6a0aee03af9cca9f22b6 Mon Sep 17 00:00:00 2001 From: David Cermak Date: Mon, 18 Aug 2025 11:09:33 +0200 Subject: [PATCH 2/2] bump(eppp): 1.0.0 -> 1.0.1 1.0.1 Bug Fixes - Support for IPv4-only mode (653328ba, #864) --- components/eppp_link/.cz.yaml | 2 +- components/eppp_link/CHANGELOG.md | 6 ++++++ components/eppp_link/idf_component.yml | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/components/eppp_link/.cz.yaml b/components/eppp_link/.cz.yaml index 05a1e661c..58f094071 100644 --- a/components/eppp_link/.cz.yaml +++ b/components/eppp_link/.cz.yaml @@ -3,6 +3,6 @@ commitizen: bump_message: 'bump(eppp): $current_version -> $new_version' pre_bump_hooks: python ../../ci/changelog.py eppp_link tag_format: eppp-v$version - version: 1.0.0 + version: 1.0.1 version_files: - idf_component.yml diff --git a/components/eppp_link/CHANGELOG.md b/components/eppp_link/CHANGELOG.md index cb24a60bc..46c4a8a18 100644 --- a/components/eppp_link/CHANGELOG.md +++ b/components/eppp_link/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## [1.0.1](https://github.com/espressif/esp-protocols/commits/eppp-v1.0.1) + +### Bug Fixes + +- Support for IPv4-only mode ([653328ba](https://github.com/espressif/esp-protocols/commit/653328ba), [#864](https://github.com/espressif/esp-protocols/issues/864)) + ## [1.0.0](https://github.com/espressif/esp-protocols/commits/eppp-v1.0.0) ### Features diff --git a/components/eppp_link/idf_component.yml b/components/eppp_link/idf_component.yml index 443f6d2a6..9a240442b 100644 --- a/components/eppp_link/idf_component.yml +++ b/components/eppp_link/idf_component.yml @@ -1,4 +1,4 @@ -version: 1.0.0 +version: 1.0.1 url: https://github.com/espressif/esp-protocols/tree/master/components/eppp_link description: The component provides a general purpose PPP connectivity, typically used as WiFi-PPP router dependencies: