diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2016-02-11 17:44:44 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2016-02-11 17:44:44 +0100 |
commit | 8efcc9589bd61171ec1fe4f71c33e9df62b6005b (patch) | |
tree | 2d07a9c80c1d903295399a7d9f8038f646b45516 | |
parent | 29eae728e959a382841bd0a32cc1a8d1bcdc9150 (diff) | |
download | busybox-w32-8efcc9589bd61171ec1fe4f71c33e9df62b6005b.tar.gz busybox-w32-8efcc9589bd61171ec1fe4f71c33e9df62b6005b.tar.bz2 busybox-w32-8efcc9589bd61171ec1fe4f71c33e9df62b6005b.zip |
networking: allow dot at the end of the domain name in dhcp response
Patch based on Balaji Punnuru <balaji.punnuru@gmail.com> work.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | networking/udhcp/dhcpc.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/networking/udhcp/dhcpc.c b/networking/udhcp/dhcpc.c index 915f65935..48097bc24 100644 --- a/networking/udhcp/dhcpc.c +++ b/networking/udhcp/dhcpc.c | |||
@@ -201,6 +201,8 @@ static int good_hostname(const char *name) | |||
201 | //Do we want this? | 201 | //Do we want this? |
202 | //return ((name - start) < 1025); /* NS_MAXDNAME */ | 202 | //return ((name - start) < 1025); /* NS_MAXDNAME */ |
203 | name++; | 203 | name++; |
204 | if (*name == '\0') | ||
205 | return 1; // We allow trailing dot too | ||
204 | } | 206 | } |
205 | } | 207 | } |
206 | #else | 208 | #else |