We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 215b7f9 commit be7a6a7Copy full SHA for be7a6a7
fs/smb/client/smb2ops.c
@@ -658,7 +658,8 @@ parse_server_interfaces(struct network_interface_info_ioctl_rsp *buf,
658
659
while (bytes_left >= (ssize_t)sizeof(*p)) {
660
memset(&tmp_iface, 0, sizeof(tmp_iface));
661
- tmp_iface.speed = le64_to_cpu(p->LinkSpeed);
+ /* default to 1Gbps when link speed is unset */
662
+ tmp_iface.speed = le64_to_cpu(p->LinkSpeed) ?: 1000000000;
663
tmp_iface.rdma_capable = le32_to_cpu(p->Capability & RDMA_CAPABLE) ? 1 : 0;
664
tmp_iface.rss_capable = le32_to_cpu(p->Capability & RSS_CAPABLE) ? 1 : 0;
665
0 commit comments