iOS device may not report hostname when requesting DHCP lease

Originator:msilverman
Number:rdar://11586768 Date Originated:6/4/2012
Status:Open Resolved:
Product:iOS Product Version:5.1.1
Classification:UI/Usability Reproducible:yes
 
Summary: An iOS device such as an iPhone or iPad running any version of the 5.x software will not report a hostname to a router when requesting a DHCP lease if the device's name (as set by the user in iTunes) when the device name is too long.

Steps to Reproduce:

1. Connect the iDevice to iTunes and rename it to be > 20 characters in length with at least 2 spaces in the name i.e. Mike Silverman's iPhone
2. Connect the iPhone via WiFi to any wireless router and take note of its IP address
3. Using whatever interface the router provides, review the DHCP lease table and note the reported host name for the iPhone (identified by its IP) is blank

Expected Results:

The iOS should report a hostname for all DHCP lease requests, performing the proper munging (turning spaces into dashes or underscores and removing punctuation) as needed to match the requirements for hostnames. For example, in the case above, the hostname should be Mike-Silvermans-iPhone

Actual Results:

The hostname reported by the iOS is blank.

Regression:

Rename the device (in iTunes) to be something shorter (i.e. Mike's iPhone) and repeat the test. The hostname is properly reported. I tested various string lengths and strings with and without spaces, the the magic number to trigger this bug seems to be around 20, with two spaces. You can sometimes get a longer string to report a hostname, but only if you don't have any spaces.

I have verified the behavior with a wide variety of routers, including both Apple base stations and 3rd-party routers (Linksys, Motorola, etc.).

Notes:

It is important for consistency's sake to always report a hostname. Sometimes reporting one and sometimes not isn't proper behavior. The hostname is important because it is often the primary means that consumer-grade routers and wireless access points identify devices attached to their networks.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!