aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2011-06-04 05:07:16 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2011-06-04 05:07:16 +0200
commit5d3aaceb790461dca3f770483bbccd161e78a728 (patch)
tree835a7db0c575f4c1e579af5f01914f8fd7a16b08
parentfe86d6b6361d07529288fa20aa5cab5472b64344 (diff)
downloadbusybox-w32-5d3aaceb790461dca3f770483bbccd161e78a728.tar.gz
busybox-w32-5d3aaceb790461dca3f770483bbccd161e78a728.tar.bz2
busybox-w32-5d3aaceb790461dca3f770483bbccd161e78a728.zip
udhcpc: allow -O OPT take numeric params
function old new delta udhcpc_main 2623 2654 +31 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--networking/udhcp/dhcpc.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/networking/udhcp/dhcpc.c b/networking/udhcp/dhcpc.c
index 510c3a1d0..5d3291b8c 100644
--- a/networking/udhcp/dhcpc.c
+++ b/networking/udhcp/dhcpc.c
@@ -1134,8 +1134,11 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv)
1134 client_config.no_default_options = 1; 1134 client_config.no_default_options = 1;
1135 while (list_O) { 1135 while (list_O) {
1136 char *optstr = llist_pop(&list_O); 1136 char *optstr = llist_pop(&list_O);
1137 unsigned n = udhcp_option_idx(optstr); 1137 unsigned n = bb_strtou(optstr, NULL, 0);
1138 n = dhcp_optflags[n].code; 1138 if (errno || n > 254) {
1139 n = udhcp_option_idx(optstr);
1140 n = dhcp_optflags[n].code;
1141 }
1139 client_config.opt_mask[n >> 3] |= 1 << (n & 7); 1142 client_config.opt_mask[n >> 3] |= 1 << (n & 7);
1140 } 1143 }
1141 while (list_x) { 1144 while (list_x) {