Skip to content

Commit 7e8af7c

Browse files
rlubosnashif
authored andcommitted
tests: net: conn_mgr: Use valid LL address in tests
Using L2 address of length 1 (invalid/unsupported one) confused IPv6 layer during LL address generation - since that length was not a valid one, the address was not initialized properly and a part of it was set semi-random. This could result for example in filling out the neighbor tables. Signed-off-by: Robert Lubos <[email protected]> (cherry picked from commit 3089a5d)
1 parent 120267b commit 7e8af7c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tests/net/conn_mgr_conn/src/test_ifaces.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
static void test_iface_init(struct net_if *iface)
1717
{
1818
/* Fake link layer address is needed to silence assertions inside the net core */
19-
static uint8_t fake_lladdr[] = { 0x01 };
19+
static uint8_t fake_lladdr[] = { 0x00, 0x00, 0x5E, 0x00, 0x53, 0x01 };
2020

2121
net_if_set_link_addr(iface, fake_lladdr, sizeof(fake_lladdr), NET_LINK_DUMMY);
2222

tests/net/conn_mgr_monitor/src/test_ifaces.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
static void test_iface_init(struct net_if *iface)
1616
{
1717
/* Fake link layer address is needed to silence assertions inside the net core */
18-
static uint8_t fake_lladdr[] = { 0x01 };
18+
static uint8_t fake_lladdr[] = { 0x00, 0x00, 0x5E, 0x00, 0x53, 0x01 };
1919

2020
net_if_set_link_addr(iface, fake_lladdr, sizeof(fake_lladdr), NET_LINK_DUMMY);
2121

0 commit comments

Comments
 (0)