Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.busybox.net/busybox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Decotigny <ddecotig@gmail.com>2018-05-24 18:30:16 +0300
committerDenys Vlasenko <vda.linux@googlemail.com>2018-05-24 19:26:01 +0300
commita174c791ece5d7f2869e9efd338d91c8ea10f609 (patch)
tree7aaacf8f1e63c1edeebe5ccce28deccec6a7f6a1
parent747162109fb1c891baf6aafa1ca0410bd08d04a4 (diff)
udhcpc6: ignore invalid OPTION_IAADDR
Signed-off-by: David Decotigny <ddecotig@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--networking/udhcp/d6_dhcpc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/networking/udhcp/d6_dhcpc.c b/networking/udhcp/d6_dhcpc.c
index 9e3ce8b1c..2ff9c5669 100644
--- a/networking/udhcp/d6_dhcpc.c
+++ b/networking/udhcp/d6_dhcpc.c
@@ -287,6 +287,10 @@ static void option_to_env(uint8_t *option, uint8_t *option_end)
* | valid-lifetime |
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
*/
+ /* Make sure payload contains an address */
+ if (option[3] < 24)
+ break;
+
sprint_nip6(ipv6str, option + 4);
*new_env() = xasprintf("ipv6=%s", ipv6str);