The FreeBSD mono port is currently configured to use the mono Linux NetworkInterface code, which contains some Linuxisms (such as parsing files in /sys/class/net/). Refer to the code here:
The FreeBSD mono port should be changed to use the Mac NetworkInterface code which works fine. Refer to the above link which shows class MacOsNetworkInterface : UnixNetworkInterface.
Auto-assigned to maintainer mono@FreeBSD.org
Created attachment 149098 [details]
PR194845: Use Mac code in mcs/class/System/System.Net.NetworkInformation/NetworkInterface.cs
Created attachment 149099 [details]
PR194845: Allow FreeBSD OS detection
Created attachment 149100 [details]
PR194845: Use Mac code within mono/metadata/socket-io.c
Copy the code used on Apple since mono/metadata/socket-io.c cannot yet "walk the result of struct ifconf". This was causing ves_icall_System_Net_Dns_GetHostByName_internal to return strange IP addresses.
Does this also solve #194660 ?
No. PR194660 is a separate issue to this. There is a separate patch already attached to that bug.
Both bugs are standalone, with their own independent patches already attached.
Thank you for your feedback.
Has this been reported upstream? If no, may I ask you to do so?
As far as I am concerned, these patches looks more acceptable than the one attached to #194660 (in respect to the comments in github's bug report), and I would just want to know what the mono buddies think about this before adding more local patches since it's a PITA to maintain them :-)
Pull request has been submitted upstream: https://github.com/mono/mono/pull/1390
Regarding PR194660, there were some initial teething issues with my patch, but it is all rectified now and should work fine. In fact that patch is even required for Mac OSX. However, as already stated, that is a separate issue to this PR (both are needed).
These patches have now been accepted into upstream mono:
What should we do with this PR? Close it and wait for next mono release, or update port to include patches until next mono release comes out?
A commit references this bug:
Date: Mon Nov 10 14:23:13 UTC 2014
New revision: 372396
Use Mac NetworkInterface code instead of Linux NetworkInterface code
Submitted by: Ben Woods <email@example.com>
Upstream patch added, thanks!