1
1
Files
zyxel-vmg8825_b50b-cfw/package/busybox/patches-1.31.1/1091-ZYXEL_ENHANCE_clear_log_CPWang.patch
T
2026-04-17 18:33:03 +02:00

59 lines
2.1 KiB
Diff

Index: busybox-1.31.1/networking/udhcp/d6_dhcpc.c
===================================================================
--- busybox-1.31.1.orig/networking/udhcp/d6_dhcpc.c 2019-06-10 18:50:53.000000000 +0800
+++ busybox-1.31.1/networking/udhcp/d6_dhcpc.c 2021-03-16 16:10:49.233805942 +0800
@@ -639,11 +639,14 @@
free(client6_data.ia_na);
client6_data.ia_na = NULL;
if (option_mask32 & OPT_r) {
+ uint32_t *iaid;
len = requested_ipv6 ? 2+2+4+4+4 + 2+2+16+4+4 : 2+2+4+4+4;
client6_data.ia_na = xzalloc(len);
client6_data.ia_na->code = D6_OPT_IA_NA;
client6_data.ia_na->len = len - 4;
- *(uint32_t*)client6_data.ia_na->data = rand(); /* IAID */
+ iaid = (uint32_t *)client6_data.ia_na->data;
+ //*(uint32_t*)client6_data.ia_na->data = rand(); /* IAID */
+ *iaid = rand(); /* IAID */
if (requested_ipv6) {
struct d6_option *iaaddr = (void*)(client6_data.ia_na->data + 4+4+4);
iaaddr->code = D6_OPT_IAADDR;
@@ -657,11 +660,14 @@
free(client6_data.ia_pd);
client6_data.ia_pd = NULL;
if (option_mask32 & OPT_d) {
+ uint32_t *iaid;
len = 2+2+4+4+4;
client6_data.ia_pd = xzalloc(len);
client6_data.ia_pd->code = D6_OPT_IA_PD;
client6_data.ia_pd->len = len - 4;
- *(uint32_t*)client6_data.ia_pd->data = rand(); /* IAID */
+ iaid = (uint32_t *)client6_data.ia_pd->data;
+ //*(uint32_t*)client6_data.ia_pd->data = rand(); /* IAID */
+ *iaid = rand(); /* IAID */
opt_ptr = mempcpy(opt_ptr, client6_data.ia_pd, len);
}
@@ -670,7 +676,7 @@
*/
opt_ptr = add_d6_client_options(opt_ptr);
- bb_info_msg("sending %s", "discover");
+ bb_info_msg("Sending DHCPv6 Discover...");
return d6_mcast_from_client_data_ifindex(&packet, opt_ptr);
}
Index: busybox-1.31.1/networking/udhcp/dhcpc.c
===================================================================
--- busybox-1.31.1.orig/networking/udhcp/dhcpc.c 2019-06-10 18:50:53.000000000 +0800
+++ busybox-1.31.1/networking/udhcp/dhcpc.c 2021-03-16 16:09:35.441805585 +0800
@@ -730,7 +730,7 @@
*/
add_client_options(&packet);
- bb_info_msg("sending %s", "discover");
+ bb_info_msg("Sending DHCPv4 Discover...");
return raw_bcast_from_client_data_ifindex(&packet, INADDR_ANY);
}