Commit e1e58daf authored by Jukka Rissanen's avatar Jukka Rissanen Committed by Benjamin Cabé
Browse files

test: net: ipv6_fragment: Set link layer protocol type for a packet

The test_send_ipv6_fragment_without_hbho() test did not set link layer
protocol type for the packet. It is needed in this case because we
are sending a ready made packet and the protocol type is unknown
otherwise.

Signed-off-by: default avatarJukka Rissanen <jukka.rissanen@nordicsemi.no>
(cherry picked from commit 7752def6)
parent 4f9fe4c4
Loading
Loading
Loading
Loading
+1 −0
Changes for tests/net/ipv6_fragment/src/main.c: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -2091,6 +2091,7 @@ ZTEST(net_ipv6_fragment, test_send_ipv6_fragment_without_hbho)
					AF_UNSPEC, 0, ALLOC_TIMEOUT);
	zassert_not_null(pkt, "packet");

	net_pkt_set_ll_proto_type(pkt, NET_ETH_PTYPE_IPV6);
	net_pkt_set_family(pkt, AF_INET6);
	net_pkt_set_ip_hdr_len(pkt, sizeof(struct net_ipv6_hdr));
	net_pkt_set_ipv6_ext_len(pkt, NET_IPV6_FRAGH_LEN); /* without hbho*/