Commit 3089a5d1 authored by Robert Lubos's avatar Robert Lubos Committed by Benjamin Cabé
Browse files

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: default avatarRobert Lubos <robert.lubos@nordicsemi.no>
parent a3bd7efb
Loading
Loading
Loading
Loading
+1 −1
Changes for tests/net/conn_mgr_conn/src/test_ifaces.c: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -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);

+1 −1
Changes for tests/net/conn_mgr_monitor/src/test_ifaces.c: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -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);