[git commit] udhcpc6: add missed big-endian conversions
Denys Vlasenko
vda.linux at googlemail.com
Wed Jul 13 14:15:04 UTC 2022
commit: https://git.busybox.net/busybox/commit/?id=9b6eb2a8ef4f1cfeeea821e270d49ef9c6ae4503
branch: https://git.busybox.net/busybox/commit/?id=refs/heads/master
function old new delta
option_to_env 686 694 +8
Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
networking/udhcp/d6_dhcpc.c | 2 ++
1 file changed, 2 insertions(+)
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)
*new_env() = xasprintf("ipv6=%s", ipv6str);
move_from_unaligned32(v32, option + 4 + 16 + 4);
+ v32 = ntohl(v32);
*new_env() = xasprintf("lease=%u", (unsigned)v32);
break;
@@ -332,6 +333,7 @@ static void option_to_env(const uint8_t *option, const uint8_t *option_end)
* +-+-+-+-+-+-+-+-+
*/
move_from_unaligned32(v32, option + 4 + 4);
+ v32 = ntohl(v32);
*new_env() = xasprintf("ipv6prefix_lease=%u", (unsigned)v32);
sprint_nip6(ipv6str, option + 4 + 4 + 4 + 1);
More information about the busybox-cvs
mailing list