Linux NIC speed type made long to fit the actual value (#32223)
authorMarie Píchová <mapichov@microsoft.com>
Fri, 14 Feb 2020 10:53:11 +0000 (11:53 +0100)
committerGitHub <noreply@github.com>
Fri, 14 Feb 2020 10:53:11 +0000 (11:53 +0100)
commitfd6bee6e877e87e8e40d8cbf0fe4413ba0985bae
treec8ccf3290e2c20132e9e0564ab2012c6a830fefc
parent571f972a5b1c7821870b1111bcc64726740957df
Linux NIC speed type made long to fit the actual value (#32223)

Fixes #18090

Linux pal level struct for network info had only int32 field for speed. Even though our public API has it as long. The problem was in value overflowing in calculation MBits --> Bits.
src/libraries/Common/src/Interop/Unix/System.Native/Interop.EnumerateInterfaceAddresses.cs
src/libraries/Native/Unix/System.Native/pal_interfaceaddresses.c
src/libraries/Native/Unix/System.Native/pal_interfaceaddresses.h
src/libraries/System.Net.NetworkInformation/tests/FunctionalTests/NetworkInterfaceBasicTest.cs