Why is Mac an ID with severe drift?

Source: Internet
Author: User

Two days ago, umeng June published a blog on "Basic Principles of mobile application statistics and Umid solutions", which mentioned that Mac is a typical ID with severe drift, this article will discuss the problem of MAC address drift. Welcome to shoot bricks.

The MAC address consists of 48 digits (6 bytes) in hexadecimal format. The first 24 bits are determined by the IEEE, And the last 24 bits are determined by the vendor that actually produces the network device. Where, FF: FF is the broadcast address, 01: XX is the multicast address, 01: 00: 5E: XX: XX is an IPv4 multicast address.

If you have experienced that the Android mobile phone does not have a live link on some networks, it is very likely that the vro has configured a MAC address filter. The changed MAC address is not on the white list.

To the surprise of many people, the MAC address of some models does change. Refer to the issue of the official Android code library:

Issue 23330: Galaxy Nexus (VZW/LTE) WiFi MAC address changes with every reboot

You can see that every startup will change the MAC address. Why? Some good guys explained that Google and Samsung didn't want to pay for MAC addresses at first, and a brilliant great programmer wrote a function,Random generationMacThe last six digits of the address.

The offending kernel code: if ((tuna_mac_addr[4] == 0) && (tuna_mac_addr[5] == 0)) { srandom32((uint)jiffies); // rand_mac = random32(); // tuna_mac_addr[3] = (unsigned char)rand_mac; tuna_mac_addr[4] = (unsigned char)(rand_mac >> 8); tuna_mac_addr[5] = (unsigned char)(rand_mac >> 16); } memcpy(buf, tuna_mac_addr, IFHWADDRLEN);

This part of the kernel code is estimated to have been copied by other manufacturers, causing the same problems for other mobile phones.

If the influence of spam is not considered, this part of data should be related to Rom and model. If a mobile phone has a problem, all the mobile phones of this phone have similar problems.

The investigation by the android developer community also proves this conclusion.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.