net: ipv6: Set IP header length on the fragmented packet

IPv6 fragmentation code did not set the IP header field on the
fragment net_pkt.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
This commit is contained in:
Robert Lubos 2023-10-29 16:07:16 +01:00 committed by Fabio Baltieri
parent 0c1c939d9e
commit 64e615263a

View File

@ -641,6 +641,7 @@ static int send_ipv6_fragment(struct net_pkt *pkt,
goto fail;
}
net_pkt_set_ip_hdr_len(frag_pkt, net_pkt_ip_hdr_len(pkt));
net_pkt_set_ipv6_ext_len(frag_pkt,
net_pkt_ipv6_ext_len(pkt) +
sizeof(struct net_ipv6_frag_hdr));