Skip to content

Commit

Permalink
tests: net: conn_mgr: Use valid LL address in tests
Browse files Browse the repository at this point in the history
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 <robert.lubos@nordicsemi.no>
(cherry picked from commit 3089a5d)
  • Loading branch information
rlubos authored and github-actions[bot] committed Feb 19, 2025
1 parent f001cf6 commit 9f7898b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/net/conn_mgr_conn/src/test_ifaces.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
static void test_iface_init(struct net_if *iface)
{
/* Fake link layer address is needed to silence assertions inside the net core */
static uint8_t fake_lladdr[] = { 0x01 };
static uint8_t fake_lladdr[] = { 0x00, 0x00, 0x5E, 0x00, 0x53, 0x01 };

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

Expand Down
2 changes: 1 addition & 1 deletion tests/net/conn_mgr_monitor/src/test_ifaces.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
static void test_iface_init(struct net_if *iface)
{
/* Fake link layer address is needed to silence assertions inside the net core */
static uint8_t fake_lladdr[] = { 0x01 };
static uint8_t fake_lladdr[] = { 0x00, 0x00, 0x5E, 0x00, 0x53, 0x01 };

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

Expand Down

0 comments on commit 9f7898b

Please sign in to comment.