tests: net: ipv6: Restore original LL address in test_change_ll_addr

Restore the original LL address on the interface after tests, instead of
generating a new one, to avoid dangling link-local IPv6 on the
interface.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
This commit is contained in:
Robert Lubos 2024-05-14 12:19:35 +02:00 committed by Johan Hedberg
commit 1d7239d00a

View file

@ -1182,12 +1182,7 @@ ZTEST(net_ipv6, test_change_ll_addr)
zassert_true(memcmp(ll->addr, ll_iface->addr, ll->len) != 0,
"Wrong link address 2");
ll_iface->addr[0] = 0x00;
ll_iface->addr[1] = 0x00;
ll_iface->addr[2] = 0x5E;
ll_iface->addr[3] = 0x00;
ll_iface->addr[4] = 0x53;
ll_iface->addr[5] = sys_rand8_get();
ll_iface->addr = net_test_data.mac_addr;
}
ZTEST(net_ipv6, test_dad_timeout)