Skip to content

Commit adf31f6

Browse files
authored
nixos/tests: fix bonding test (NixOS#375496)
2 parents e6b177d + 441c242 commit adf31f6

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

nixos/tests/networking/networkd-and-scripted.nix

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,18 @@ let
238238
}
239239
];
240240
};
241+
242+
# virtio-net reports its speed and duplex as "unknown" by default,
243+
# which confuses the 802.3ad logic. However, you can just tell it
244+
# to pretend to have any link speed with ethtool, so do that.
245+
systemd.services.fake-link-settings = {
246+
path = [ pkgs.ethtool ];
247+
script = ''
248+
ethtool -s enp1s0 speed 1000 duplex full
249+
ethtool -s enp2s0 speed 1000 duplex full
250+
'';
251+
wantedBy = [ "network.target" ];
252+
};
241253
};
242254
in
243255
{

0 commit comments

Comments
 (0)