[git commit] udhcpc: dns labels can actually start with a number

Denys Vlasenko vda.linux at googlemail.com
Thu Jul 30 01:03:58 UTC 2015


commit: http://git.busybox.net/busybox/commit/?id=c29021e2a594fb29471c8c7e61ab8f45296622ba
branch: http://git.busybox.net/busybox/commit/?id=refs/heads/master

While RFC1035 recommends a label not to start with a number, there is
actually no such limitation in dns. One may buy a domain name like
0x1.net and use it.

This commit remove this check and allow a user to use such domains.

Signed-off-by: Arthur Gautier <baloo at gandi.net>
Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
 networking/udhcp/dhcpc.c |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/networking/udhcp/dhcpc.c b/networking/udhcp/dhcpc.c
index 9d3d1a3..811a1a1 100644
--- a/networking/udhcp/dhcpc.c
+++ b/networking/udhcp/dhcpc.c
@@ -156,10 +156,6 @@ static const char *valid_domain_label(const char *label)
 	for (;;) {
 		ch = *label;
 		if ((ch|0x20) < 'a' || (ch|0x20) > 'z') {
-			if (pos == 0) {
-				/* label must begin with letter */
-				return NULL;
-			}
 			if (ch < '0' || ch > '9') {
 				if (ch == '\0' || ch == '.')
 					return label;


More information about the busybox-cvs mailing list