]> git.ipfire.org Git - thirdparty/ipxe.git/commit
[test] Assign unique MAC addresses for test network devices 1646/head
authorMichael Brown <mcb30@ipxe.org>
Mon, 9 Mar 2026 22:52:38 +0000 (22:52 +0000)
committerMichael Brown <mcb30@ipxe.org>
Mon, 9 Mar 2026 22:52:38 +0000 (22:52 +0000)
commite180aa85e60bdb9c8d9da4fc557a8752705644ba
treea396aa4e9e4c7a3f889f1d0e6e6072dd5b541da4
parent5edffb26b292e64c32a865abd640ae7b364d853f
[test] Assign unique MAC addresses for test network devices

Commit 19dffdc ("[efi] Allow for creating devices with no EFI parent
device") relaxed the restriction on attempting to create SNP devices
when no EFI parent device is available, with the result that the test
network devices created when running the IPv4 tests are now registered
as SNP devices.

Since the dummy EFI parent device path is fixed and the test network
device MAC addresses are empty, the SNP devices end up with identical
constructed device paths and registration of the second and subsequent
devices will fail since device paths must be unique.

Fix by assigning MAC addresses to the test network devices.

Reported-by: Miao Wang <shankerwangmiao@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/tests/ipv4_test.c
src/tests/netdev_test.c
src/tests/netdev_test.h