From 0fdd6b5bf640a3af72b84de4e666059987e47c68 Mon Sep 17 00:00:00 2001 From: zhanghongyu Date: Wed, 17 Sep 2025 10:26:49 +0800 Subject: [PATCH] ipfrag: use netdev_iob_replace_l2 to replace d_iob d_len needs to include NET_LL_HDRLEN(dev) to avoid errors in the verification of message length in ipv4_in/ipv6_in. Signed-off-by: zhanghongyu --- net/ipfrag/ipv4_frag.c | 2 +- net/ipfrag/ipv6_frag.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/net/ipfrag/ipv4_frag.c b/net/ipfrag/ipv4_frag.c index d62d09ee913..2c15267f45a 100644 --- a/net/ipfrag/ipv4_frag.c +++ b/net/ipfrag/ipv4_frag.c @@ -309,7 +309,7 @@ int32_t ipv4_fragin(FAR struct net_driver_s *dev) */ ipv4_fragin_reassemble(node); - netdev_iob_replace(dev, node->outgoframe); + netdev_iob_replace_l2(dev, node->outgoframe); /* Free the memory of node */ diff --git a/net/ipfrag/ipv6_frag.c b/net/ipfrag/ipv6_frag.c index ffae571ef48..0a86c26ce2c 100644 --- a/net/ipfrag/ipv6_frag.c +++ b/net/ipfrag/ipv6_frag.c @@ -515,7 +515,7 @@ int32_t ipv6_fragin(FAR struct net_driver_s *dev) */ ipv6_fragin_reassemble(node); - netdev_iob_replace(dev, node->outgoframe); + netdev_iob_replace_l2(dev, node->outgoframe); /* Free the memory of node */