Skip to content

Commit e1e58da

Browse files
jukkarkartben
authored andcommitted
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: Jukka Rissanen <[email protected]> (cherry picked from commit 7752def)
1 parent 4f9fe4c commit e1e58da

File tree

1 file changed

+1
-0
lines changed
  • tests/net/ipv6_fragment/src

1 file changed

+1
-0
lines changed

tests/net/ipv6_fragment/src/main.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2091,6 +2091,7 @@ ZTEST(net_ipv6_fragment, test_send_ipv6_fragment_without_hbho)
20912091
AF_UNSPEC, 0, ALLOC_TIMEOUT);
20922092
zassert_not_null(pkt, "packet");
20932093

2094+
net_pkt_set_ll_proto_type(pkt, NET_ETH_PTYPE_IPV6);
20942095
net_pkt_set_family(pkt, AF_INET6);
20952096
net_pkt_set_ip_hdr_len(pkt, sizeof(struct net_ipv6_hdr));
20962097
net_pkt_set_ipv6_ext_len(pkt, NET_IPV6_FRAGH_LEN); /* without hbho*/

0 commit comments

Comments
 (0)