aboutsummaryrefslogtreecommitdiff
path: root/networking/udhcp/dhcpc.h
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2021-06-02 13:50:26 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2021-06-02 14:07:26 +0200
commit265fcddd08f22c99a2a419a1537c18f4d6d43e9f (patch)
treee1cfb7a18bb0887b95700a7417f88ff90883bfa3 /networking/udhcp/dhcpc.h
parent9659a8db1dd28bdf8659fdae5d097b6f48bd2736 (diff)
downloadbusybox-w32-265fcddd08f22c99a2a419a1537c18f4d6d43e9f.tar.gz
busybox-w32-265fcddd08f22c99a2a419a1537c18f4d6d43e9f.tar.bz2
busybox-w32-265fcddd08f22c99a2a419a1537c18f4d6d43e9f.zip
udhcpc: include client-id option in DECLINEs, even if it's a custom -x 61:HEX option
client_data.vendorclass, .hostname and .fqdn probably need the same treatment: just insert them into the list of -x opts, get rid of if (client_data.vendorclass) udhcp_add_binary_option(packet, client_data.vendorclass); if (client_data.hostname) udhcp_add_binary_option(packet, client_data.hostname); if (client_data.fqdn) udhcp_add_binary_option(packet, client_data.fqdn); function old new delta udhcp_insert_new_option - 166 +166 perform_release 171 207 +36 perform_d6_release 227 259 +32 udhcpc6_main 2558 2580 +22 init_d6_packet 103 84 -19 udhcpc_main 2585 2564 -21 attach_option 397 253 -144 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 3/3 up/down: 256/-184) Total: 72 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking/udhcp/dhcpc.h')
-rw-r--r--networking/udhcp/dhcpc.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/networking/udhcp/dhcpc.h b/networking/udhcp/dhcpc.h
index 7ad01ea8f..a4cc188b6 100644
--- a/networking/udhcp/dhcpc.h
+++ b/networking/udhcp/dhcpc.h
@@ -8,7 +8,8 @@
8PUSH_AND_SET_FUNCTION_VISIBILITY_TO_HIDDEN 8PUSH_AND_SET_FUNCTION_VISIBILITY_TO_HIDDEN
9 9
10struct client_data_t { 10struct client_data_t {
11 uint8_t client_mac[6]; /* Our mac address */ 11 uint8_t clientid[2+2 + 6]; /* Our mac address (prefixed by padding used for client-id) */
12#define client_data_client_mac (client_data.clientid + 2+2)
12 IF_FEATURE_UDHCP_PORT(uint16_t port;) 13 IF_FEATURE_UDHCP_PORT(uint16_t port;)
13 int ifindex; /* Index number of the interface to use */ 14 int ifindex; /* Index number of the interface to use */
14 uint8_t opt_mask[256 / 8]; /* Bitmask of options to send (-O option) */ 15 uint8_t opt_mask[256 / 8]; /* Bitmask of options to send (-O option) */
@@ -17,7 +18,6 @@ struct client_data_t {
17 char *pidfile; /* Optionally store the process ID */ 18 char *pidfile; /* Optionally store the process ID */
18 const char *script; /* User script to run at dhcp events */ 19 const char *script; /* User script to run at dhcp events */
19 struct option_set *options; /* list of DHCP options to send to server */ 20 struct option_set *options; /* list of DHCP options to send to server */
20 uint8_t *clientid; /* Optional client id to use */
21 uint8_t *vendorclass; /* Optional vendor class-id to use */ 21 uint8_t *vendorclass; /* Optional vendor class-id to use */
22 uint8_t *hostname; /* Optional hostname to use */ 22 uint8_t *hostname; /* Optional hostname to use */
23 uint8_t *fqdn; /* Optional fully qualified domain name to use */ 23 uint8_t *fqdn; /* Optional fully qualified domain name to use */