summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko2022-08-02 15:33:51 +0200
committerDenys Vlasenko2022-08-02 15:33:51 +0200
commit75aaa8b3118d4a34b83ece4ec953b8448b19b519 (patch)
tree9c9678d32b2bb817913c83071e6367861959e423
parent3147552a230cfd4a4943a46f63e3313655acf566 (diff)
downloadbusybox-75aaa8b3118d4a34b83ece4ec953b8448b19b519.zip
busybox-75aaa8b3118d4a34b83ece4ec953b8448b19b519.tar.gz
udhcpc6: fix sending of renew messages
function old new delta d6_listen_socket - 150 +150 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--networking/udhcp/d6_dhcpc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/networking/udhcp/d6_dhcpc.c b/networking/udhcp/d6_dhcpc.c
index d4cdd0c..9666f04 100644
--- a/networking/udhcp/d6_dhcpc.c
+++ b/networking/udhcp/d6_dhcpc.c
@@ -844,7 +844,7 @@ static NOINLINE int send_d6_renew(struct in6_addr *server_ipv6, struct in6_addr
uint8_t *opt_ptr;
/* Fill in: msg type, xid, ELAPSED_TIME */
- opt_ptr = init_d6_packet(&packet, DHCPREQUEST);
+ opt_ptr = init_d6_packet(&packet, D6_MSG_RENEW);
/* server id */
opt_ptr = mempcpy(opt_ptr, client6_data.server_id, client6_data.server_id->len + 2+2);
@@ -1083,7 +1083,7 @@ static void change_listen_mode(int new_mode)
client_data.sockfd = -1;
}
if (new_mode == LISTEN_KERNEL)
- client_data.sockfd = udhcp_listen_socket(/*INADDR_ANY,*/ CLIENT_PORT6, client_data.interface);
+ client_data.sockfd = d6_listen_socket(/*INADDR_ANY,*/ CLIENT_PORT6, client_data.interface);
else if (new_mode != LISTEN_NONE)
client_data.sockfd = d6_raw_socket(client_data.ifindex);
/* else LISTEN_NONE: client_data.sockfd stays closed */
@@ -1489,6 +1489,7 @@ int udhcpc6_main(int argc UNUSED_PARAM, char **argv)
if (opt & OPT_l)
send_d6_info_request();
else /* send a broadcast renew request */
+//TODO: send_d6_renew uses D6_MSG_RENEW message, should we use D6_MSG_REBIND here instead?
send_d6_renew(/*server_ipv6:*/ NULL, requested_ipv6);
timeout = discover_timeout;
packet_num++;