Open
Description
Commit 17ff057 introduces:
17ff05739 cores/arduino/mbed/connectivity/netsocket/include/netsocket/ICMPSocket.h (pennam 2025-02-04 15:29:31 +0100 40) #if MBED_CONF_LWIP_RAW_SOCKET_ENABLED
17ff05739 cores/arduino/mbed/connectivity/netsocket/include/netsocket/ICMPSocket.h (pennam 2025-02-04 15:29:31 +0100 41) int ping(SocketAddress &socketAddress, uint32_t timeout);
17ff05739 cores/arduino/mbed/connectivity/netsocket/include/netsocket/ICMPSocket.h (pennam 2025-02-04 15:29:31 +0100 42) #endif
17ff05739 cores/arduino/mbed/connectivity/netsocket/include/netsocket/ICMPSocket.h (pennam 2025-02-04 15:29:31 +0100 43)
however in SocketHelpers.cpp:
int arduino::MbedSocketClass::ping(SocketAddress &socketAddress, uint8_t ttl, uint32_t timeout)
{
/* ttl is not supported by mbed ICMPSocket. Default value used is 255 */
(void)ttl;
ICMPSocket s;
s.set_timeout(timeout);
s.open(getNetwork());
int response = s.ping(socketAddress, timeout);
s.close();
return response;
}
the ping()
call (and the ping method on MbedSocketClass) is unprotected by the MBED_CONF_LWIP_RAW_SOCKET_ENABLED macro.
Looking at the commit it's clear the new mbed is built with raw socket enabled as the macros are defined on the GIGA M7 but not the M4 aka GENERIC_STM32H747_M4 so the mbed for M4 does not compile.
I am guessing this commit was a patch on:
commit 4cd3c25bfa9e3c2152bcce5db027fe68516008d3
Author: fabik111 <fabiomassimo.centonze@gmail.com>
Date: Wed Jan 8 16:07:55 2025 +0100
Add ping command
which enabled raw sockets on M7 and not M4 while adding the ping command. There's no comment on the commit to explain the rationale of M7 and not M4 and no mention of a ticket so I do not feel qualified to fix it.
Metadata
Metadata
Assignees
Labels
No labels