summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorJonas Karlman <[email protected]>2026-01-17 00:24:40 +0000
committerJerome Forissier <[email protected]>2026-02-04 09:04:36 +0100
commit8d89b16ea4bae5b0df1080f0c3b8ea4a751f40ea (patch)
treec1ae83316260f2aa5dfe98874b4bb7c73164e168 /cmd
parent3299bffc7c8e57059be3738bc53c7709b7f981be (diff)
net: lwip: Use ipaddr helpers
The ip_addr_t of lwIP has support for both IPv6 and IPv4 addresses. Some lwIP commans is directly accessing the internal addr field of the ip_addr_t instead of using ipaddr helper functions. Change to use ipaddr helper functions where appropriate to remove direct access of the internal addr field. Also change a few instances from ip4 to the version less ipaddr helpers. There is no intended functional change, besides the change from using ip4 addr helper to using version less ipaddr helper. Signed-off-by: Jonas Karlman <[email protected]> Reviewed-by: Jerome Forissier <[email protected]>
Diffstat (limited to 'cmd')
-rw-r--r--cmd/lwip/ping.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/lwip/ping.c b/cmd/lwip/ping.c
index 6d090fc530d..fc4cf7bde5f 100644
--- a/cmd/lwip/ping.c
+++ b/cmd/lwip/ping.c
@@ -35,7 +35,7 @@ static u8_t ping_recv(void *arg, struct raw_pcb *pcb, struct pbuf *p,
struct ping_ctx *ctx = arg;
struct icmp_echo_hdr *iecho = ctx->iecho;
- if (addr->addr != ctx->target.addr)
+ if (!ip_addr_eq(addr, &ctx->target))
return 0;
if ((p->tot_len >= (IP_HLEN + sizeof(struct icmp_echo_hdr))) &&