diff options
Diffstat (limited to 'networking/udhcp/dhcpc.c')
-rw-r--r-- | networking/udhcp/dhcpc.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/networking/udhcp/dhcpc.c b/networking/udhcp/dhcpc.c index 478ca5c21..c36d4180b 100644 --- a/networking/udhcp/dhcpc.c +++ b/networking/udhcp/dhcpc.c | |||
@@ -879,21 +879,17 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv) | |||
879 | client_config.no_default_options = 1; | 879 | client_config.no_default_options = 1; |
880 | while (list_O) { | 880 | while (list_O) { |
881 | char *optstr = llist_pop(&list_O); | 881 | char *optstr = llist_pop(&list_O); |
882 | int n = index_in_strings(dhcp_option_strings, optstr); | 882 | unsigned n = udhcp_option_idx(optstr); |
883 | if (n < 0) | ||
884 | bb_error_msg_and_die("unknown option '%s'", optstr); | ||
885 | n = dhcp_options[n].code; | 883 | n = dhcp_options[n].code; |
886 | client_config.opt_mask[n >> 3] |= 1 << (n & 7); | 884 | client_config.opt_mask[n >> 3] |= 1 << (n & 7); |
887 | } | 885 | } |
888 | while (list_x) { | 886 | while (list_x) { |
889 | int n; | 887 | unsigned n; |
890 | char *optstr = llist_pop(&list_x); | 888 | char *optstr = llist_pop(&list_x); |
891 | char *colon = strchr(optstr, ':'); | 889 | char *colon = strchr(optstr, ':'); |
892 | if (colon) | 890 | if (colon) |
893 | *colon = '\0'; | 891 | *colon = '\0'; |
894 | n = index_in_strings(dhcp_option_strings, optstr); | 892 | n = udhcp_option_idx(optstr); |
895 | if (n < 0) | ||
896 | bb_error_msg_and_die("unknown option '%s'", optstr); | ||
897 | if (colon) | 893 | if (colon) |
898 | *colon = ' '; | 894 | *colon = ' '; |
899 | udhcp_str2optset(optstr, &client_config.options); | 895 | udhcp_str2optset(optstr, &client_config.options); |