aboutsummaryrefslogtreecommitdiff
path: root/networking/udhcp/dhcpc.c
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2014-06-16 00:17:00 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2014-06-16 00:17:00 +0200
commit85090c162b322a4ffe53d251e59bbfc212a829ee (patch)
tree1b547e8c14ddafcb853e46eaff6724c212326123 /networking/udhcp/dhcpc.c
parent9aa6ffb22b712d4e928604e291f954b02237e8cd (diff)
downloadbusybox-w32-85090c162b322a4ffe53d251e59bbfc212a829ee.tar.gz
busybox-w32-85090c162b322a4ffe53d251e59bbfc212a829ee.tar.bz2
busybox-w32-85090c162b322a4ffe53d251e59bbfc212a829ee.zip
udhcpc: make hostname sanitization optional. Closes 3979
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking/udhcp/dhcpc.c')
-rw-r--r--networking/udhcp/dhcpc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/networking/udhcp/dhcpc.c b/networking/udhcp/dhcpc.c
index 7dfc160e2..e468b7bbb 100644
--- a/networking/udhcp/dhcpc.c
+++ b/networking/udhcp/dhcpc.c
@@ -136,6 +136,7 @@ static int mton(uint32_t mask)
136 return i; 136 return i;
137} 137}
138 138
139#if ENABLE_FEATURE_UDHCPC_SANITIZEOPT
139/* Check if a given label represents a valid DNS label 140/* Check if a given label represents a valid DNS label
140 * Return pointer to the first character after the label upon success, 141 * Return pointer to the first character after the label upon success,
141 * NULL otherwise. 142 * NULL otherwise.
@@ -192,6 +193,9 @@ static int good_hostname(const char *name)
192 name++; 193 name++;
193 } 194 }
194} 195}
196#else
197# define good_hostname(name) 1
198#endif
195 199
196/* Create "opt_name=opt_value" string */ 200/* Create "opt_name=opt_value" string */
197static NOINLINE char *xmalloc_optname_optval(uint8_t *option, const struct dhcp_optflag *optflag, const char *opt_name) 201static NOINLINE char *xmalloc_optname_optval(uint8_t *option, const struct dhcp_optflag *optflag, const char *opt_name)