[PATCH v1 0/2] lwip: add Kconfig to decode and print ICMP unreachable messages

Jerome Forissier jerome.forissier at linaro.org
Tue Aug 12 09:49:29 CEST 2025



On 8/11/25 17:56, Peter Robinson wrote:
> Hi Jerome,
> 
>> When using commands based on UDP such as tftp or sntp, if the server is
>> not reachable or the service is not started on the expected port then
>> the command ultimately times out. However it often happens that the server
>> or a router sends back an ICMP Destination Unreachable message. That can
>> help troubleshooting. Therefore, add support to the lwIP stack and to
> 
> Has the patch for adding support to the lwIP stack been sent upstream
> for review? Please reference the upstream patch for this.

Yes, see https://github.com/lwip-tcpip/lwip/pull/73. I will add a link to
the commit description.
 
> Also related, what is the status of other out of tree patches to upstream LWIP?

At the moment we have:

- 5634ecc88e9 ("net: lwip: tftp: bind to TFTP port only when in server mode")
Submitted upstream as https://savannah.nongnu.org/patch/?10480 and
https://github.com/lwip-tcpip/lwip/pull/61.
Status: MERGED (https://github.com/lwip-tcpip/lwip/commit/b1edb7780f5f)

- 27d7ccda94f ("net: lwip: tftp: add support of blksize option to client")
further modified by 10917df17f2 ("net: lwip: tftp: fix find_option()")
Submitted upstream as https://github.com/lwip-tcpip/lwip/pull/62
Status: PENDING

- f69f7aef26f ("lwip: tls: enforce checking of server certificates based on
CA availability")
Submitted upstream as https://github.com/lwip-tcpip/lwip/pull/63
Status: PENDING

- Part of 9349fc2e9c76 ("net, net-lwip: wget: suppress console output when
called by EFI")
Submitted upstream as https://github.com/lwip-tcpip/lwip/pull/66
Status: PENDING

- Patch 1/2 in this series ("lwip: icmp: allow reporting ICMP detination
unreachable")
Submitted upstream as https://github.com/lwip-tcpip/lwip/pull/73
Status: PENDING

FYI we do track this information internally here at Linaro. I could as well
store it in a public location if it makes more sense.

Regards,
-- 
Jerome


> Peter
> 
>> U-Boot to handle those packets and print a diagnostic message on the
>> console.
>>
>>
>> Jerome Forissier (2):
>>   lwip: icmp: allow reporting ICMP detination unreachable
>>   net: lwip: add Kconfig option to show ICMP unreachable errors
>>
>>  lib/lwip/lwip/src/core/ipv4/icmp.c | 17 +++++++++----
>>  lib/lwip/u-boot/arch/cc.h          |  7 ++++++
>>  lib/lwip/u-boot/lwipopts.h         |  4 ++++
>>  net/lwip/Kconfig                   | 13 ++++++++++
>>  net/lwip/Makefile                  |  1 +
>>  net/lwip/icmp_unreach.c            | 38 ++++++++++++++++++++++++++++++
>>  6 files changed, 76 insertions(+), 4 deletions(-)
>>  create mode 100644 net/lwip/icmp_unreach.c
>>
>> --
>> 2.43.0
>>
>> base-commit: ae5711f881100f856ead1e76832c32b92dba93c7
>> branch: lwip-icmp-unreach


More information about the U-Boot mailing list