Skip to content

Commit 865ed89

Browse files
committed
tests: net: checksum_offload: Use proper network interface
Instead of hardcoding the network interface value, use net_if_ipv6_select_src_iface() so that proper network interface gets used. Signed-off-by: Jukka Rissanen <[email protected]>
1 parent 924e433 commit 865ed89

File tree

1 file changed

+3
-3
lines changed
  • tests/net/checksum_offload/src

1 file changed

+3
-3
lines changed

tests/net/checksum_offload/src/main.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ static struct in6_addr my_addr2 = { { { 0x20, 0x01, 0x0d, 0xb8, 0, 0, 0, 0,
5353
0, 0, 0, 0, 0, 0, 0, 0x1 } } };
5454

5555
/* Destination address for test packets */
56-
static struct in6_addr dst_addr = { { { 0x20, 0x01, 0x0d, 0xb8, 9, 0, 0, 0,
57-
0, 0, 0, 0, 0, 0, 0, 0x1 } } };
56+
static struct in6_addr dst_addr = { { { 0x20, 0x01, 0x0d, 0xb8, 0, 0, 0, 0,
57+
0, 0, 0, 0, 0, 0, 0, 0x2 } } };
5858

5959
/* Extra address is assigned to ll_addr */
6060
static struct in6_addr ll_addr = { { { 0xfe, 0x80, 0x43, 0xb8, 0, 0, 0, 0,
@@ -845,7 +845,7 @@ static void test_rx_chksum_offload_enabled_test_v6(void)
845845
sizeof(struct sockaddr_in6));
846846
zassert_equal(ret, 0, "Context bind failure test failed");
847847

848-
iface = eth_interfaces[1];
848+
iface = net_if_ipv6_select_src_iface(&dst_addr6.sin6_addr);
849849
ctx = net_if_get_device(iface)->data;
850850
zassert_equal_ptr(&eth_context_offloading_enabled, ctx,
851851
"eth context mismatch");

0 commit comments

Comments
 (0)