aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2022-07-13 16:15:04 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2022-07-13 16:15:04 +0200
commit9b6eb2a8ef4f1cfeeea821e270d49ef9c6ae4503 (patch)
tree500aa21a5506a87329043a6b6b3304ab3d44a4fc
parent7b969bb2ada4d7757229fd735135f7720ef8008c (diff)
downloadbusybox-w32-9b6eb2a8ef4f1cfeeea821e270d49ef9c6ae4503.tar.gz
busybox-w32-9b6eb2a8ef4f1cfeeea821e270d49ef9c6ae4503.tar.bz2
busybox-w32-9b6eb2a8ef4f1cfeeea821e270d49ef9c6ae4503.zip
udhcpc6: add missed big-endian conversions
function old new delta option_to_env 686 694 +8 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--networking/udhcp/d6_dhcpc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/networking/udhcp/d6_dhcpc.c b/networking/udhcp/d6_dhcpc.c
index 9fc690315..d4cdd0c3a 100644
--- a/networking/udhcp/d6_dhcpc.c
+++ b/networking/udhcp/d6_dhcpc.c
@@ -295,6 +295,7 @@ static void option_to_env(const uint8_t *option, const uint8_t *option_end)
295 *new_env() = xasprintf("ipv6=%s", ipv6str); 295 *new_env() = xasprintf("ipv6=%s", ipv6str);
296 296
297 move_from_unaligned32(v32, option + 4 + 16 + 4); 297 move_from_unaligned32(v32, option + 4 + 16 + 4);
298 v32 = ntohl(v32);
298 *new_env() = xasprintf("lease=%u", (unsigned)v32); 299 *new_env() = xasprintf("lease=%u", (unsigned)v32);
299 break; 300 break;
300 301
@@ -332,6 +333,7 @@ static void option_to_env(const uint8_t *option, const uint8_t *option_end)
332 * +-+-+-+-+-+-+-+-+ 333 * +-+-+-+-+-+-+-+-+
333 */ 334 */
334 move_from_unaligned32(v32, option + 4 + 4); 335 move_from_unaligned32(v32, option + 4 + 4);
336 v32 = ntohl(v32);
335 *new_env() = xasprintf("ipv6prefix_lease=%u", (unsigned)v32); 337 *new_env() = xasprintf("ipv6prefix_lease=%u", (unsigned)v32);
336 338
337 sprint_nip6(ipv6str, option + 4 + 4 + 4 + 1); 339 sprint_nip6(ipv6str, option + 4 + 4 + 4 + 1);