tests: net: ipv6: Adjust the source address of test pkt
We would drop the received packet if the source address is our
address so tweak the test and make source address different.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
(cherry picked from commit 155e2149f2506cc82432d3c9c7b20db353fa58d1)
diff --git a/tests/net/ipv6/src/main.c b/tests/net/ipv6/src/main.c
index 82133a5..9d47ee0 100644
--- a/tests/net/ipv6/src/main.c
+++ b/tests/net/ipv6/src/main.c
@@ -1293,7 +1293,7 @@
struct in6_addr localaddr = { { { 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0x1 } } };
struct in6_addr addr = { { { 0x20, 0x01, 0x0d, 0xb8, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0x1 } } };
+ 0, 0, 0, 0, 0, 0, 0, 0x10 } } };
enum net_verdict verdict;
verdict = recv_msg(&localaddr, &addr);
@@ -1306,7 +1306,7 @@
struct in6_addr localaddr = { { { 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0x1 } } };
struct in6_addr addr = { { { 0x20, 0x01, 0x0d, 0xb8, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0x1 } } };
+ 0, 0, 0, 0, 0, 0, 0, 0x10 } } };
enum net_verdict verdict;
verdict = recv_msg(&addr, &localaddr);
@@ -1319,7 +1319,7 @@
struct in6_addr mcast_iface = { { { 0xff, 0x01, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0 } } };
struct in6_addr addr = { { { 0x20, 0x01, 0x0d, 0xb8, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0x1 } } };
+ 0, 0, 0, 0, 0, 0, 0, 0x10 } } };
enum net_verdict verdict;
verdict = recv_msg(&addr, &mcast_iface);
@@ -1332,7 +1332,7 @@
struct in6_addr mcast_zero = { { { 0xff, 0x00, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0 } } };
struct in6_addr addr = { { { 0x20, 0x01, 0x0d, 0xb8, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0x1 } } };
+ 0, 0, 0, 0, 0, 0, 0, 0x10 } } };
enum net_verdict verdict;
verdict = recv_msg(&addr, &mcast_zero);
@@ -1345,7 +1345,7 @@
struct in6_addr mcast_site = { { { 0xff, 0x05, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0 } } };
struct in6_addr addr = { { { 0x20, 0x01, 0x0d, 0xb8, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0x1 } } };
+ 0, 0, 0, 0, 0, 0, 0, 0x10 } } };
enum net_verdict verdict;
verdict = recv_msg(&addr, &mcast_site);
@@ -1432,7 +1432,7 @@
struct in6_addr mcast_all_dhcp = { { { 0xff, 0x05, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0x01, 0, 0, 0, 0x03 } } };
struct in6_addr addr = { { { 0x20, 0x01, 0x0d, 0xb8, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0x1 } } };
+ 0, 0, 0, 0, 0, 0, 0, 0x10 } } };
enum net_verdict verdict;
struct net_context *ctx;
@@ -1461,7 +1461,7 @@
struct in6_addr mcast_org = { { { 0xff, 0x08, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0 } } };
struct in6_addr addr = { { { 0x20, 0x01, 0x0d, 0xb8, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0x1 } } };
+ 0, 0, 0, 0, 0, 0, 0, 0x10 } } };
enum net_verdict verdict;
verdict = recv_msg(&addr, &mcast_org);
@@ -1474,7 +1474,7 @@
struct in6_addr mcast_iface = { { { 0xff, 0x01, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0 } } };
struct in6_addr addr = { { { 0x20, 0x01, 0x0d, 0xb8, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0x1 } } };
+ 0, 0, 0, 0, 0, 0, 0, 0x10 } } };
struct net_if_mcast_addr *maddr;
struct net_context *ctx;
int ret;
@@ -1516,7 +1516,7 @@
};
struct in6_addr in6_addr_any = IN6ADDR_ANY_INIT;
struct in6_addr addr = { { { 0x20, 0x01, 0x0d, 0xb8, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0x1 } } };
+ 0, 0, 0, 0, 0, 0x10 } } };
struct net_context *ctx;
enum net_verdict verdict;
@@ -1546,7 +1546,7 @@
};
struct in6_addr in6_addr_any = IN6ADDR_ANY_INIT;
struct in6_addr addr = { { { 0x20, 0x01, 0x0d, 0xb8, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0x1 } } };
+ 0, 0, 0, 0, 0, 0x10 } } };
struct net_if_mcast_addr *maddr;
struct net_context *ctx;
enum net_verdict verdict;
@@ -1592,7 +1592,7 @@
0x08 } } };
struct in6_addr in6_addr_any = IN6ADDR_ANY_INIT;
struct in6_addr addr = { { { 0x20, 0x01, 0x0d, 0xb8, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0x1 } } };
+ 0, 0, 0, 0, 0, 0x10 } } };
struct net_if *test_iface = net_if_get_first_by_type(&NET_L2_GET_NAME(DUMMY));
struct net_if_mcast_addr *maddr;
struct net_context *ctx;
@@ -1633,7 +1633,7 @@
{
bool ret;
struct in6_addr addr = { { { 0x20, 0x01, 0x0d, 0xb8, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0x99, 0x1 } } };
+ 0, 0, 0, 0, 0, 0, 0x99, 0x10 } } };
struct net_if *iface = TEST_NET_IF;
struct net_if_addr *ifaddr;