[git commit] udhcpc6: fix ipv6prefix[_lease] envvar value in script invocation

Denys Vlasenko vda.linux at googlemail.com
Tue Jan 16 15:00:13 UTC 2018


commit: https://git.busybox.net/busybox/commit/?id=688cb3bc1979bad4236315517a7c7bb3a51289f1
branch: https://git.busybox.net/busybox/commit/?id=refs/heads/master

Based on a patch by DannyAAM <danny at saru.moe>.

Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
 networking/udhcp/d6_dhcpc.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/networking/udhcp/d6_dhcpc.c b/networking/udhcp/d6_dhcpc.c
index 37ffd06..65ff5de 100644
--- a/networking/udhcp/d6_dhcpc.c
+++ b/networking/udhcp/d6_dhcpc.c
@@ -277,11 +277,11 @@ static void option_to_env(uint8_t *option, uint8_t *option_end)
  * |               |
  * +-+-+-+-+-+-+-+-+
  */
-			//move_from_unaligned32(v32, option + 4 + 4);
-			//*new_env() = xasprintf("lease=%u", (unsigned)v32);
+			move_from_unaligned32(v32, option + 4 + 4);
+			*new_env() = xasprintf("ipv6prefix_lease=%u", (unsigned)v32);
 
-			sprint_nip6(ipv6str, option + 4 + 4 + 1);
-			*new_env() = xasprintf("ipv6prefix=%s/%u", ipv6str, (unsigned)(option[4 + 4]));
+			sprint_nip6(ipv6str, option + 4 + 4 + 4 + 1);
+			*new_env() = xasprintf("ipv6prefix=%s/%u", ipv6str, (unsigned)(option[4 + 4 + 4]));
 			break;
 #if ENABLE_FEATURE_UDHCPC6_RFC3646
 		case D6_OPT_DNS_SERVERS: {


More information about the busybox-cvs mailing list