Skip to content

Commit 01ad112

Browse files
jukkarcfriedt
authored andcommitted
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 <[email protected]> (cherry picked from commit 155e214)
1 parent 652b7f6 commit 01ad112

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

tests/net/ipv6/src/main.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1171,7 +1171,7 @@ static void test_src_localaddr_recv(void)
11711171
struct in6_addr localaddr = { { { 0, 0, 0, 0, 0, 0, 0, 0,
11721172
0, 0, 0, 0, 0, 0, 0, 0x1 } } };
11731173
struct in6_addr addr = { { { 0x20, 0x01, 0x0d, 0xb8, 0, 0, 0, 0,
1174-
0, 0, 0, 0, 0, 0, 0, 0x1 } } };
1174+
0, 0, 0, 0, 0, 0, 0, 0x10 } } };
11751175
enum net_verdict verdict;
11761176

11771177
verdict = recv_msg(&localaddr, &addr);
@@ -1184,7 +1184,7 @@ static void test_dst_localaddr_recv(void)
11841184
struct in6_addr localaddr = { { { 0, 0, 0, 0, 0, 0, 0, 0,
11851185
0, 0, 0, 0, 0, 0, 0, 0x1 } } };
11861186
struct in6_addr addr = { { { 0x20, 0x01, 0x0d, 0xb8, 0, 0, 0, 0,
1187-
0, 0, 0, 0, 0, 0, 0, 0x1 } } };
1187+
0, 0, 0, 0, 0, 0, 0, 0x10 } } };
11881188
enum net_verdict verdict;
11891189

11901190
verdict = recv_msg(&addr, &localaddr);
@@ -1197,7 +1197,7 @@ static void test_dst_iface_scope_mcast_recv(void)
11971197
struct in6_addr mcast_iface = { { { 0xff, 0x01, 0, 0, 0, 0, 0, 0,
11981198
0, 0, 0, 0, 0, 0, 0, 0 } } };
11991199
struct in6_addr addr = { { { 0x20, 0x01, 0x0d, 0xb8, 0, 0, 0, 0,
1200-
0, 0, 0, 0, 0, 0, 0, 0x1 } } };
1200+
0, 0, 0, 0, 0, 0, 0, 0x10 } } };
12011201
enum net_verdict verdict;
12021202

12031203
verdict = recv_msg(&addr, &mcast_iface);
@@ -1210,7 +1210,7 @@ static void test_dst_zero_scope_mcast_recv(void)
12101210
struct in6_addr mcast_zero = { { { 0xff, 0x00, 0, 0, 0, 0, 0, 0,
12111211
0, 0, 0, 0, 0, 0, 0, 0 } } };
12121212
struct in6_addr addr = { { { 0x20, 0x01, 0x0d, 0xb8, 0, 0, 0, 0,
1213-
0, 0, 0, 0, 0, 0, 0, 0x1 } } };
1213+
0, 0, 0, 0, 0, 0, 0, 0x10 } } };
12141214
enum net_verdict verdict;
12151215

12161216
verdict = recv_msg(&addr, &mcast_zero);
@@ -1223,7 +1223,7 @@ static void test_dst_site_scope_mcast_recv_drop(void)
12231223
struct in6_addr mcast_site = { { { 0xff, 0x05, 0, 0, 0, 0, 0, 0,
12241224
0, 0, 0, 0, 0, 0, 0, 0 } } };
12251225
struct in6_addr addr = { { { 0x20, 0x01, 0x0d, 0xb8, 0, 0, 0, 0,
1226-
0, 0, 0, 0, 0, 0, 0, 0x1 } } };
1226+
0, 0, 0, 0, 0, 0, 0, 0x10 } } };
12271227
enum net_verdict verdict;
12281228

12291229
verdict = recv_msg(&addr, &mcast_site);
@@ -1302,7 +1302,7 @@ static void test_dst_site_scope_mcast_recv_ok(void)
13021302
struct in6_addr mcast_all_dhcp = { { { 0xff, 0x05, 0, 0, 0, 0, 0, 0,
13031303
0, 0, 0, 0x01, 0, 0, 0, 0x03 } } };
13041304
struct in6_addr addr = { { { 0x20, 0x01, 0x0d, 0xb8, 0, 0, 0, 0,
1305-
0, 0, 0, 0, 0, 0, 0, 0x1 } } };
1305+
0, 0, 0, 0, 0, 0, 0, 0x10 } } };
13061306
enum net_verdict verdict;
13071307
struct net_context *ctx;
13081308

@@ -1329,7 +1329,7 @@ static void test_dst_org_scope_mcast_recv(void)
13291329
struct in6_addr mcast_org = { { { 0xff, 0x08, 0, 0, 0, 0, 0, 0,
13301330
0, 0, 0, 0, 0, 0, 0, 0 } } };
13311331
struct in6_addr addr = { { { 0x20, 0x01, 0x0d, 0xb8, 0, 0, 0, 0,
1332-
0, 0, 0, 0, 0, 0, 0, 0x1 } } };
1332+
0, 0, 0, 0, 0, 0, 0, 0x10 } } };
13331333
enum net_verdict verdict;
13341334

13351335
verdict = recv_msg(&addr, &mcast_org);
@@ -1342,7 +1342,7 @@ static void test_dst_iface_scope_mcast_send(void)
13421342
struct in6_addr mcast_iface = { { { 0xff, 0x01, 0, 0, 0, 0, 0, 0,
13431343
0, 0, 0, 0, 0, 0, 0, 0 } } };
13441344
struct in6_addr addr = { { { 0x20, 0x01, 0x0d, 0xb8, 0, 0, 0, 0,
1345-
0, 0, 0, 0, 0, 0, 0, 0x1 } } };
1345+
0, 0, 0, 0, 0, 0, 0, 0x10 } } };
13461346
struct net_if_mcast_addr *maddr;
13471347
struct net_context *ctx;
13481348
int ret;
@@ -1382,7 +1382,7 @@ static void test_dst_unknown_group_mcast_recv(void)
13821382
};
13831383
struct in6_addr in6_addr_any = IN6ADDR_ANY_INIT;
13841384
struct in6_addr addr = { { { 0x20, 0x01, 0x0d, 0xb8, 0, 0, 0, 0, 0, 0,
1385-
0, 0, 0, 0, 0, 0x1 } } };
1385+
0, 0, 0, 0, 0, 0x10 } } };
13861386
struct net_context *ctx;
13871387
enum net_verdict verdict;
13881388

@@ -1412,7 +1412,7 @@ static void test_dst_unjoined_group_mcast_recv(void)
14121412
};
14131413
struct in6_addr in6_addr_any = IN6ADDR_ANY_INIT;
14141414
struct in6_addr addr = { { { 0x20, 0x01, 0x0d, 0xb8, 0, 0, 0, 0, 0, 0,
1415-
0, 0, 0, 0, 0, 0x1 } } };
1415+
0, 0, 0, 0, 0, 0x10 } } };
14161416
struct net_if_mcast_addr *maddr;
14171417
struct net_context *ctx;
14181418
enum net_verdict verdict;
@@ -1454,7 +1454,7 @@ static void test_dst_is_other_iface_mcast_recv(void)
14541454
0x08 } } };
14551455
struct in6_addr in6_addr_any = IN6ADDR_ANY_INIT;
14561456
struct in6_addr addr = { { { 0x20, 0x01, 0x0d, 0xb8, 0, 0, 0, 0, 0, 0,
1457-
0, 0, 0, 0, 0, 0x1 } } };
1457+
0, 0, 0, 0, 0, 0x10 } } };
14581458
struct net_if_mcast_addr *maddr;
14591459
struct net_context *ctx;
14601460
enum net_verdict verdict;

0 commit comments

Comments
 (0)