Bug 7616

Summary: udhcpc converts hostname to bad
Product: Busybox Reporter: Hubenau
Component: NetworkingAssignee: unassigned
Status: RESOLVED FIXED    
Severity: minor CC: busybox-cvs
Priority: P5    
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Host: Target:
Build:

Description Hubenau 2014-11-07 11:32:24 UTC
Hello Busybox Team,

I build udhcpc with "ENABLE_FEATURE_UDHCPC_SANITIZEOPT" enabled.

If my client get a hostname prefix with a number udhcpc converts it to "bad".

in source code

http://git.busybox.net/busybox/tree/networking/udhcp/dhcpc.c
line 139 ff

there RFC1035 is refered but this is for domains only.
For hostnames RFC952 should by used. For internethosts RFC1123.
Both allow numbers as first character for hostnames.

kind regards
Hubenau
Comment 1 Denys Vlasenko 2016-03-30 12:00:20 UTC
Fixed in git already:

commit c29021e2a594fb29471c8c7e61ab8f45296622ba
Author: Arthur Gautier <baloo@gandi.net>
Date:   Tue Jul 28 05:35:00 2015 +0000
    
    udhcpc: dns labels can actually start with a number