diff --git a/components/eppp_link/.cz.yaml b/components/eppp_link/.cz.yaml index bd413845d..73f5b9317 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.1.2 + version: 1.1.3 version_files: - idf_component.yml diff --git a/components/eppp_link/CHANGELOG.md b/components/eppp_link/CHANGELOG.md index 4aeaf7775..81e923aa3 100644 --- a/components/eppp_link/CHANGELOG.md +++ b/components/eppp_link/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.1.3](https://github.com/espressif/esp-protocols/commits/eppp-v1.1.3) + +### Bug Fixes + +- Fix test dependency issue on driver ([1ace92c2](https://github.com/espressif/esp-protocols/commit/1ace92c2)) +- Fix tun netif to (optionally) return errors ([7a6cf0f9](https://github.com/espressif/esp-protocols/commit/7a6cf0f9)) + ## [1.1.2](https://github.com/espressif/esp-protocols/commits/eppp-v1.1.2) ### Bug Fixes diff --git a/components/eppp_link/eppp_netif_tun.c b/components/eppp_link/eppp_netif_tun.c index 7b905213e..01f9ed2bb 100644 --- a/components/eppp_link/eppp_netif_tun.c +++ b/components/eppp_link/eppp_netif_tun.c @@ -17,9 +17,17 @@ #include "esp_check.h" #include "esp_idf_version.h" +#if defined(CONFIG_ESP_NETIF_RECEIVE_REPORT_ERRORS) +typedef esp_err_t esp_netif_recv_ret_t; +#define ESP_NETIF_OPTIONAL_RETURN_CODE(expr) expr +#else +typedef void esp_netif_recv_ret_t; +#define ESP_NETIF_OPTIONAL_RETURN_CODE(expr) +#endif // CONFIG_ESP_NETIF_RECEIVE_REPORT_ERRORS + static const char *TAG = "eppp_tun_netif"; -static void tun_input(void *h, void *buffer, unsigned int len, void *eb) +static esp_netif_recv_ret_t tun_input(void *h, void *buffer, unsigned int len, void *eb) { __attribute__((unused)) esp_err_t ret = ESP_OK; struct netif *netif = h; @@ -31,11 +39,12 @@ static void tun_input(void *h, void *buffer, unsigned int len, void *eb) ESP_GOTO_ON_FALSE(pbuf_remove_header(p, SIZEOF_ETH_HDR) == 0, ESP_FAIL, err, TAG, "pbuf_remove_header failed"); memcpy(p->payload, buffer, len); ESP_GOTO_ON_FALSE(netif->input(p, netif) == ERR_OK, ESP_FAIL, err, TAG, "failed to input packet to lwip"); - return; + return ESP_NETIF_OPTIONAL_RETURN_CODE(ESP_OK); err: if (p) { pbuf_free(p); } + return ESP_NETIF_OPTIONAL_RETURN_CODE(ret); } static err_t tun_output(struct netif *netif, struct pbuf *p) diff --git a/components/eppp_link/idf_component.yml b/components/eppp_link/idf_component.yml index 06d8b9def..0ff8b9096 100644 --- a/components/eppp_link/idf_component.yml +++ b/components/eppp_link/idf_component.yml @@ -1,4 +1,4 @@ -version: 1.1.2 +version: 1.1.3 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: diff --git a/components/eppp_link/test/test_app/main/CMakeLists.txt b/components/eppp_link/test/test_app/main/CMakeLists.txt index c75a706cc..708acff79 100644 --- a/components/eppp_link/test/test_app/main/CMakeLists.txt +++ b/components/eppp_link/test/test_app/main/CMakeLists.txt @@ -1,4 +1,10 @@ +if("${IDF_VERSION_MAJOR}.${IDF_VERSION_MINOR}" VERSION_GREATER "5.3") + set(driver_deps esp_driver_gpio esp_driver_spi esp_driver_uart esp_driver_sdio) +else() + set(driver_deps driver) +endif() + idf_component_register(SRCS app_main.c INCLUDE_DIRS "." REQUIRES test_utils - PRIV_REQUIRES unity nvs_flash esp_netif driver esp_event) + PRIV_REQUIRES unity nvs_flash esp_netif esp_event ${driver_deps})