]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
fix(test): assign fixed address to bridge
authorBeniamino Galvani <bgalvani@redhat.com>
Thu, 2 Feb 2023 09:42:00 +0000 (10:42 +0100)
committerAntonio Álvarez Feijoo <antonio.feijoo@suse.com>
Tue, 7 Feb 2023 13:40:11 +0000 (14:40 +0100)
Kernel uses the lowest MAC of all attached ports as MAC address of the
bridge. However, after the first port gets attached, DHCP can be started on the
bridge and it will use the MAC (and client-id) of the first port; so, the MAC
used for DHCP depends on the order of attachment of ports, which is not
guaranteed to be stable in general.

To make sure that the DHCP server always sees the request from the MAC of
enp0s1, assign that MAC to the bridge from the kernel command line.

test/TEST-50-MULTINIC/test.sh

index 5172782985fc3b5f762e13fa87f2c2135be48aca..321927ab3ff8897721467565e564b668f90e2b71 100755 (executable)
@@ -169,7 +169,7 @@ test_client() {
     # bridge, where only one interface is actually connected
     client_test "MULTINIC bridging" \
         00 01 02 \
-        "root=nfs:192.168.50.1:/nfs/client ip=bridge0:dhcp  bridge=bridge0:enp0s1,enp0s5,enp0s6" \
+        "root=nfs:192.168.50.1:/nfs/client ip=bridge0:dhcp::52:54:00:12:34:00 bridge=bridge0:enp0s1,enp0s5,enp0s6" \
         "bridge0" || return 1
     return 0
 }