Skip to content

Commit 7752def

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 <jukka.rissanen@nordicsemi.no>
1 parent fc16c42 commit 7752def

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
@@ -2090,6 +2090,7 @@ ZTEST(net_ipv6_fragment, test_send_ipv6_fragment_without_hbho)
20902090
AF_UNSPEC, 0, ALLOC_TIMEOUT);
20912091
zassert_not_null(pkt, "packet");
20922092

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

0 commit comments

Comments
 (0)