Search Issue Tracker

Fixed in 4.5.X

Votes

21

Found in

4.3.1f1

Issue ID

587067

Regression

No

[Mono] NetworkInterface.GetAllNetworkInterfaces() raises bad length ArgumentException with "long" OS X adapter names

Mono

-

Calling NetworkInterface.GetAllNetworkInterfaces() in MacOS X, when there are adapters with more than 6 characters (i.e. "bridge0", "vboxnet0"), raises ArgumentException since the length of the destination array is only 6 bytes.

Comments (11)

  1. swswggg

    Feb 13, 2014 12:32

    In iOS, the same result is produced.
    here is the exception message in xcode 4

    ArgumentException: length
    at System.Array.Copy (System.Array sourceArray, Int32 sourceIndex, System.Array destinationArray, Int32 destinationIndex, Int32 length) [0x00000] in <filename unknown>:0
    at System.Net.NetworkInformation.MacOsNetworkInterface.ImplGetAllNetworkInterfaces () [0x00000] in <filename unknown>:0
    at System.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces () [0x00000] in <filename unknown>:0

    (Filename: Line: -1)

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.