From 3ecbabf76f8e2497a3c393f91bcc2d08fba1a534 Mon Sep 17 00:00:00 2001 From: jordan Date: Thu, 23 Jul 2026 16:16:42 -0500 Subject: [PATCH 1/2] esp: check ll send return value. --- src/wolfesp.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/wolfesp.c b/src/wolfesp.c index c95e70e8..b02da645 100644 --- a/src/wolfesp.c +++ b/src/wolfesp.c @@ -1868,7 +1868,12 @@ esp_send(struct wolfIP_ll_dev * ll_dev, const struct wolfIP_ip_packet *ip, } /* send it */ - ll_dev->send(ll_dev, esp, ip_final_len + ETH_HEADER_LEN); + esp_rc = ll_dev->send(ll_dev, esp, ip_final_len + ETH_HEADER_LEN); + if (esp_rc != (ip_final_len + ETH_HEADER_LEN)) { + ESP_LOG("error: esp dev send: sent %d, expected %d\n", esp_rc, + (ip_final_len + ETH_HEADER_LEN)); + return -1; + } return 0; } #endif /* WOLFIP_ESP && !WOLFESP_SRC */ From 9abf7da045bebed624baf43f667d361f3d21c859 Mon Sep 17 00:00:00 2001 From: jordan Date: Mon, 27 Jul 2026 09:47:09 -0500 Subject: [PATCH 2/2] esp: review cleanup. --- src/wolfesp.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/wolfesp.c b/src/wolfesp.c index b02da645..05397833 100644 --- a/src/wolfesp.c +++ b/src/wolfesp.c @@ -1869,9 +1869,8 @@ esp_send(struct wolfIP_ll_dev * ll_dev, const struct wolfIP_ip_packet *ip, /* send it */ esp_rc = ll_dev->send(ll_dev, esp, ip_final_len + ETH_HEADER_LEN); - if (esp_rc != (ip_final_len + ETH_HEADER_LEN)) { - ESP_LOG("error: esp dev send: sent %d, expected %d\n", esp_rc, - (ip_final_len + ETH_HEADER_LEN)); + if (esp_rc < 0) { + ESP_LOG("error: esp dev send: %d\n", esp_rc); return -1; } return 0;