nixosTests.systemd-initrd.bridge: fix failing test
Since slave interfaces of a bridge cannot be assigned IP addresses, we must prevent IPs from being assigned to them via the test framework modules. Since c6f6c282181d5c6fb8f63d95738b97b09f25c945, all nodes get ipv6 addresses by default, so we must ensure IP addresses of any type don't get assigned to the bridge slave interfaces.
This commit is contained in:
parent
b146e009e2
commit
b3e86dc1e9
@ -24,20 +24,23 @@
|
|||||||
serviceConfig.Type = "oneshot";
|
serviceConfig.Type = "oneshot";
|
||||||
};
|
};
|
||||||
|
|
||||||
networking.primaryIPAddress = "192.168.1.${toString config.virtualisation.test.nodeNumber}";
|
networking.primaryIPAddress = lib.mkForce "192.168.1.${toString config.virtualisation.test.nodeNumber}";
|
||||||
|
|
||||||
|
virtualisation.interfaces.eth1 = {
|
||||||
|
vlan = 1;
|
||||||
|
assignIP = false;
|
||||||
|
};
|
||||||
|
virtualisation.interfaces.eth2 = {
|
||||||
|
vlan = 2;
|
||||||
|
assignIP = false;
|
||||||
|
};
|
||||||
|
|
||||||
virtualisation.vlans = [
|
|
||||||
1
|
|
||||||
2
|
|
||||||
];
|
|
||||||
networking.bridges.br0.interfaces = [
|
networking.bridges.br0.interfaces = [
|
||||||
"eth1"
|
"eth1"
|
||||||
"eth2"
|
"eth2"
|
||||||
];
|
];
|
||||||
|
|
||||||
networking.interfaces = {
|
networking.interfaces = {
|
||||||
eth1.ipv4.addresses = lib.mkForce [ ];
|
|
||||||
eth2.ipv4.addresses = lib.mkForce [ ];
|
|
||||||
br0.ipv4.addresses = [
|
br0.ipv4.addresses = [
|
||||||
{
|
{
|
||||||
address = config.networking.primaryIPAddress;
|
address = config.networking.primaryIPAddress;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user