aboutsummaryrefslogtreecommitdiff
path: root/networking/udhcp/common.h
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2011-12-08 16:41:05 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2011-12-08 16:41:05 +0100
commit7280d2017d8075267a12e469983e38277dcf0374 (patch)
tree3a6bd5c562b04dfadeb72ba7f599db66026977f1 /networking/udhcp/common.h
parent53782d9221c854be057edfc4e847ea13717dfece (diff)
downloadbusybox-7280d2017d8075267a12e469983e38277dcf0374.tar.gz
udhcpc: sanitize hostnames in incoming packets. Closes 3979.
The following options are replaced with string "bad" if they contain malformed hostname: HOST_NAME, DOMAIN_NAME, NIS_DOMAIN, TFTP_SERVER_NAME function old new delta xmalloc_optname_optval 850 888 +38 attach_option 440 443 +3 len_of_option_as_string 13 14 +1 dhcp_option_lengths 13 14 +1 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 4/0 up/down: 43/0) Total: 43 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking/udhcp/common.h')
-rw-r--r--networking/udhcp/common.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/networking/udhcp/common.h b/networking/udhcp/common.h
index 479ae49f3..cfd58679a 100644
--- a/networking/udhcp/common.h
+++ b/networking/udhcp/common.h
@@ -80,6 +80,9 @@ enum {
OPTION_IP = 1,
OPTION_IP_PAIR,
OPTION_STRING,
+ /* Opts of STRING_HOST type will be sanitized before they are passed
+ * to udhcpc script's environment: */
+ OPTION_STRING_HOST,
// OPTION_BOOLEAN,
OPTION_U8,
OPTION_U16,