The following pull request was submitted through Github. It can be accessed and reviewed at: https://github.com/lxc/lxd/pull/7383
This e-mail was sent by the LXC bot, direct replies will not reach the author unless they happen to be subscribed to this list. === Description (from pull-request) === the same way we don't in the legacy part of the interface. Closes: #7382. Signed-off-by: Christian Brauner <christian.brau...@ubuntu.com>
From 68ee8bd0dfd9671faefb6e95af7eb7cefbf214ef Mon Sep 17 00:00:00 2001 From: Christian Brauner <christian.brau...@ubuntu.com> Date: Tue, 19 May 2020 07:42:44 +0200 Subject: [PATCH] ethtool: don't report -1 for speed in ethtoolLink() the same way we don't in the legacy part of the interface. Closes: #7382. Signed-off-by: Christian Brauner <christian.brau...@ubuntu.com> --- lxd/resources/network_ethtool.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lxd/resources/network_ethtool.go b/lxd/resources/network_ethtool.go index fd534c4286..1938cc8afe 100644 --- a/lxd/resources/network_ethtool.go +++ b/lxd/resources/network_ethtool.go @@ -300,7 +300,10 @@ func ethtoolLink(ethtoolFd int, req *ethtoolReq, info *api.ResourcesNetworkCardP } // Link speed - info.LinkSpeed = uint64(ethLinkSettings.speed) + speed := uint64(ethLinkSettings.speed) + if speed < uint64(^uint32(0)) { + info.LinkSpeed = speed + } } // Transceiver
_______________________________________________ lxc-devel mailing list lxc-devel@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-devel