diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2018-12-17 18:07:18 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2018-12-17 18:07:18 +0100 |
commit | 6d3b4bb24da9a07c263f3c1acf8df85382ff562c (patch) | |
tree | 62b1094f93c955774e8b2d4aee798029a5a71b7d /networking/udhcp/common.h | |
parent | 4b72aebe80aaa50a765d5ff61d7d67ed731502d9 (diff) | |
download | busybox-w32-6d3b4bb24da9a07c263f3c1acf8df85382ff562c.tar.gz busybox-w32-6d3b4bb24da9a07c263f3c1acf8df85382ff562c.tar.bz2 busybox-w32-6d3b4bb24da9a07c263f3c1acf8df85382ff562c.zip |
udhcpc: check that 4-byte options are indeed 4-byte, closes 11506
function old new delta
udhcp_get_option32 - 27 +27
udhcp_get_option 231 248 +17
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 1/0 up/down: 44/0) Total: 44 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking/udhcp/common.h')
-rw-r--r-- | networking/udhcp/common.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/networking/udhcp/common.h b/networking/udhcp/common.h index 7ad603d33..9511152ff 100644 --- a/networking/udhcp/common.h +++ b/networking/udhcp/common.h | |||
@@ -205,6 +205,10 @@ extern const uint8_t dhcp_option_lengths[] ALIGN1; | |||
205 | unsigned FAST_FUNC udhcp_option_idx(const char *name, const char *option_strings); | 205 | unsigned FAST_FUNC udhcp_option_idx(const char *name, const char *option_strings); |
206 | 206 | ||
207 | uint8_t *udhcp_get_option(struct dhcp_packet *packet, int code) FAST_FUNC; | 207 | uint8_t *udhcp_get_option(struct dhcp_packet *packet, int code) FAST_FUNC; |
208 | /* Same as above + ensures that option length is 4 bytes | ||
209 | * (returns NULL if size is different) | ||
210 | */ | ||
211 | uint8_t *udhcp_get_option32(struct dhcp_packet *packet, int code) FAST_FUNC; | ||
208 | int udhcp_end_option(uint8_t *optionptr) FAST_FUNC; | 212 | int udhcp_end_option(uint8_t *optionptr) FAST_FUNC; |
209 | void udhcp_add_binary_option(struct dhcp_packet *packet, uint8_t *addopt) FAST_FUNC; | 213 | void udhcp_add_binary_option(struct dhcp_packet *packet, uint8_t *addopt) FAST_FUNC; |
210 | #if ENABLE_UDHCPC || ENABLE_UDHCPD | 214 | #if ENABLE_UDHCPC || ENABLE_UDHCPD |