From 9914d8b861a0edb42051bd68a37bceb0562daa70 Mon Sep 17 00:00:00 2001 From: Martin Lewis Date: Tue, 4 Aug 2020 17:27:16 -0500 Subject: udhcpc: add support for long options Duplicate options are currently overridden (only the last option is kept). This leads to unexpected behavior when using long options. The patch adds support for long options in compliance with RFC 3396. Fixes #13136. function old new delta udhcp_run_script 601 725 +124 optitem_unset_env_and_free - 38 +38 putenvp 46 59 +13 static.xmalloc_optname_optval 718 717 -1 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 2/1 up/down: 175/-1) Total: 174 bytes Signed-off-by: Martin Lewis Signed-off-by: Denys Vlasenko --- networking/udhcp/dhcpc.h | 1 + 1 file changed, 1 insertion(+) (limited to 'networking/udhcp/dhcpc.h') diff --git a/networking/udhcp/dhcpc.h b/networking/udhcp/dhcpc.h index b407a6cdb..7ad01ea8f 100644 --- a/networking/udhcp/dhcpc.h +++ b/networking/udhcp/dhcpc.h @@ -21,6 +21,7 @@ struct client_data_t { uint8_t *vendorclass; /* Optional vendor class-id to use */ uint8_t *hostname; /* Optional hostname to use */ uint8_t *fqdn; /* Optional fully qualified domain name to use */ + llist_t *envp; /* list of DHCP options used for env vars */ unsigned first_secs; unsigned last_secs; -- cgit v1.2.3