Skip to content

Commit 33a3ec5

Browse files
authored
Merge pull request #865 from david-cermak/fix/eppp_ipv4_only
[eppp]: Support for IPv4-only mode
2 parents f8748e0 + c91578c commit 33a3ec5

File tree

5 files changed

+19
-4
lines changed

5 files changed

+19
-4
lines changed

components/eppp_link/.cz.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ commitizen:
33
bump_message: 'bump(eppp): $current_version -> $new_version'
44
pre_bump_hooks: python ../../ci/changelog.py eppp_link
55
tag_format: eppp-v$version
6-
version: 1.0.0
6+
version: 1.0.1
77
version_files:
88
- idf_component.yml

components/eppp_link/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## [1.0.1](https://github.com/espressif/esp-protocols/commits/eppp-v1.0.1)
4+
5+
### Bug Fixes
6+
7+
- Support for IPv4-only mode ([653328ba](https://github.com/espressif/esp-protocols/commit/653328ba), [#864](https://github.com/espressif/esp-protocols/issues/864))
8+
39
## [1.0.0](https://github.com/espressif/esp-protocols/commits/eppp-v1.0.0)
410

511
### Features

components/eppp_link/eppp_netif_tun.c

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,13 @@ static err_t tun_output_v4(struct netif *netif, struct pbuf *p, const ip4_addr_t
6565
LWIP_UNUSED_ARG(ipaddr);
6666
return tun_output(netif, p);
6767
}
68+
#if LWIP_IPV6
6869
static err_t tun_output_v6(struct netif *netif, struct pbuf *p, const ip6_addr_t *ipaddr)
6970
{
7071
LWIP_UNUSED_ARG(ipaddr);
7172
return tun_output(netif, p);
7273
}
73-
74+
#endif
7475
static err_t tun_init(struct netif *netif)
7576
{
7677
if (netif == NULL) {
@@ -151,9 +152,12 @@ static void cmd_ping_on_ping_end(esp_ping_handle_t hdl, void *args)
151152
}
152153
if (IP_IS_V4(&target_addr)) {
153154
ESP_LOGD(TAG, "\n--- %s ping statistics ---\n", inet_ntoa(*ip_2_ip4(&target_addr)));
154-
} else {
155+
}
156+
#if LWIP_IPV6
157+
else {
155158
ESP_LOGD(TAG, "\n--- %s ping statistics ---\n", inet6_ntoa(*ip_2_ip6(&target_addr)));
156159
}
160+
#endif
157161
ESP_LOGI(TAG, "%" PRIu32 " packets transmitted, %" PRIu32 " received, %" PRIu32 "%% packet loss, time %" PRIu32 "ms\n",
158162
transmitted, received, loss, total_time_ms);
159163
esp_ping_delete_session(hdl);
@@ -168,7 +172,11 @@ esp_err_t eppp_check_connection(esp_netif_t *netif)
168172
ip_addr_t target_addr = {0};
169173
esp_netif_ip_info_t ip;
170174
esp_netif_get_ip_info(netif, &ip);
175+
#if LWIP_IPV6
171176
target_addr.u_addr.ip4.addr = ip.gw.addr;
177+
#else
178+
target_addr.addr = ip.gw.addr;
179+
#endif
172180
config.target_addr = target_addr;
173181
esp_ping_callbacks_t cbs = {
174182
.cb_args = netif,
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
CONFIG_LWIP_IPV6=n

components/eppp_link/idf_component.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: 1.0.0
1+
version: 1.0.1
22
url: https://github.com/espressif/esp-protocols/tree/master/components/eppp_link
33
description: The component provides a general purpose PPP connectivity, typically used as WiFi-PPP router
44
dependencies:

0 commit comments

Comments
 (0)