Bug 2012 - NetworkInterface.GetPhysicalAddress mangles the address
Summary: NetworkInterface.GetPhysicalAddress mangles the address
Status: RESOLVED FIXED
Alias: None
Product: iOS
Classification: Xamarin
Component: Xamarin.iOS.dll ()
Version: 5.0
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Gonzalo Paniagua Javier
URL:
Depends on:
Blocks:
 
Reported: 2011-11-12 14:07 UTC by Derik Palacino
Modified: 2012-01-16 17:10 UTC (History)
8 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Derik Palacino 2011-11-12 14:07:07 UTC
In short, calling to get the physical address of a network interface mangles the address. Of the 6 segments that comprise a MAC address the first 3 become the last 3 and the last 3 are all 0.

Example:

Obj-C MAC: 00:16:CB:CB:BC:3B 
MonoTouch MAC: CB:BC:3B:0:0:0 


For more information please see:

On-going discussion, source code and reference URLs
http://monotouch.2284126.n4.nabble.com/Get-MAC-address-td4017921.html
Comment 1 Derik Palacino 2011-11-12 14:07:52 UTC
It has also been reported that this is an issue in OSX in addition to iOS.
Comment 2 Gonzalo Paniagua Javier 2011-11-17 11:21:04 UTC
I'll take a look at this.
Comment 3 Gonzalo Paniagua Javier 2011-12-13 10:28:32 UTC
Fixed in master/c89f1eb, mono-2-10/a02076b
Comment 4 Derik Palacino 2011-12-13 11:14:03 UTC
Exciting news, will there be a build soon that includes this fix? This is huge since Apple killed the device unique identifier!
Comment 5 Dean 2012-01-03 02:38:31 UTC
Any news on when this will be released or is there any work around?
Comment 6 Rolf Bjarne Kvinge [MSFT] 2012-01-03 10:00:29 UTC
It will be released with MonoTouch 5.0.4 (which should be coming later this month).
Comment 7 Chris Hardy [MSFT] 2012-01-03 18:08:30 UTC
Just a note, it should be released with MonoTouch 5.0.5 since 5.0.4 is already released :)
Comment 8 René Ruppert 2012-01-16 08:06:56 UTC
Should the fix be in the 5.1.1 branch? I'm asking because it is not.
Comment 9 Rolf Bjarne Kvinge [MSFT] 2012-01-16 08:09:34 UTC
No, this was fixed after 5.1.1 was released. It will be in 5.1.2 though.
Comment 10 René Ruppert 2012-01-16 08:16:21 UTC
Is it possible to use some source code from Github and include it directly in my app so I could have access to the MAC address even before 5.1.2 is released?
Comment 11 Dean 2012-01-16 17:07:36 UTC
oh no! it didn't make it in 5.1.1... as Rene, is there anyway we can fix it ourselves?

I have an app update I need to get through and this is one of the last bits that is holding it up now.

Cheers
Dean
Comment 12 Rolf Bjarne Kvinge [MSFT] 2012-01-16 17:08:26 UTC
Dean: you can get 5.1.2, which came out just now :)
Comment 13 Dean 2012-01-16 17:10:04 UTC
Thanks Rolf, just hit Check for Updates and here it comes! yay!