Bug 7616 - udhcpc converts hostname to bad
Summary: udhcpc converts hostname to bad
Status: RESOLVED FIXED
Alias: None
Product: Busybox
Classification: Unclassified
Component: Networking (show other bugs)
Version: unspecified
Hardware: All All
: P5 minor
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-07 11:32 UTC by Hubenau
Modified: 2016-03-30 12:00 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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