projects
/
platform
/
upstream
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fe86d6b
)
udhcpc: allow -O OPT take numeric params
author
Denys Vlasenko
<vda.linux@googlemail.com>
Sat, 4 Jun 2011 03:07:16 +0000
(
05:07
+0200)
committer
Denys Vlasenko
<vda.linux@googlemail.com>
Sat, 4 Jun 2011 03:07:16 +0000
(
05:07
+0200)
function old new delta
udhcpc_main 2623 2654 +31
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
networking/udhcp/dhcpc.c
patch
|
blob
|
history
diff --git
a/networking/udhcp/dhcpc.c
b/networking/udhcp/dhcpc.c
index
510c3a1
..
5d3291b
100644
(file)
--- a/
networking/udhcp/dhcpc.c
+++ b/
networking/udhcp/dhcpc.c
@@
-1134,8
+1134,11
@@
int udhcpc_main(int argc UNUSED_PARAM, char **argv)
client_config.no_default_options = 1;
while (list_O) {
char *optstr = llist_pop(&list_O);
- unsigned n = udhcp_option_idx(optstr);
- n = dhcp_optflags[n].code;
+ unsigned n = bb_strtou(optstr, NULL, 0);
+ if (errno || n > 254) {
+ n = udhcp_option_idx(optstr);
+ n = dhcp_optflags[n].code;
+ }
client_config.opt_mask[n >> 3] |= 1 << (n & 7);
}
while (list_x) {