summaryrefslogtreecommitdiff
path: root/networking
diff options
context:
space:
mode:
authorDenys Vlasenko2021-06-05 16:48:06 +0200
committerDenys Vlasenko2021-06-05 17:06:35 +0200
commit274ce6cce1eaa9033dee0050700f0ca9c2b5afdd (patch)
treeeb24e0222ccc7fa4d5af54785f97e8ced916d681 /networking
parent5a72b0cd74d6de8ed39a9704798ce1118b0995f1 (diff)
downloadbusybox-274ce6cce1eaa9033dee0050700f0ca9c2b5afdd.zip
busybox-274ce6cce1eaa9033dee0050700f0ca9c2b5afdd.tar.gz
udhcpc: revert deprecation message for -V
"-x vendor:VENDOR" will not be a trivial replacement of it: (1) by default, we do send a vendor string ("udhcp BB_VER"), will need code to preserve the default. (2) -V '' currently disables vendor string. -x vendor:'' would not easily achieve that: it adds no option at all (string options can't be empty), and default (1) would trigger. To avoid that, we will need yet another hack to detect -x vendor:'' and interpret that as "no vendor string at all". IOW: removing -V is likely to increase code size, not decrease. function old new delta udhcpc_main 2563 2555 -8 .rodata 103251 103198 -53 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-61) Total: -61 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking')
-rw-r--r--networking/udhcp/dhcpc.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/networking/udhcp/dhcpc.c b/networking/udhcp/dhcpc.c
index f388003..4e3d8ca 100644
--- a/networking/udhcp/dhcpc.c
+++ b/networking/udhcp/dhcpc.c
@@ -1326,10 +1326,7 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv)
}
if (str_V[0] != '\0') {
char *p;
- unsigned len;
- //msg added 2021-06
- bb_error_msg("option -V VENDOR is deprecated, use -x vendor:VENDOR");
- len = strlen(str_V);
+ unsigned len = strnlen(str_V, 254);
p = udhcp_insert_new_option(
&client_data.options, DHCP_VENDOR,
len, /*dhcp6:*/ 0);