diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2022-08-02 15:33:51 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2022-08-02 15:33:51 +0200 |
commit | 75aaa8b3118d4a34b83ece4ec953b8448b19b519 (patch) | |
tree | 9c9678d32b2bb817913c83071e6367861959e423 | |
parent | 3147552a230cfd4a4943a46f63e3313655acf566 (diff) | |
download | busybox-w32-75aaa8b3118d4a34b83ece4ec953b8448b19b519.tar.gz busybox-w32-75aaa8b3118d4a34b83ece4ec953b8448b19b519.tar.bz2 busybox-w32-75aaa8b3118d4a34b83ece4ec953b8448b19b519.zip |
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.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/networking/udhcp/d6_dhcpc.c b/networking/udhcp/d6_dhcpc.c index d4cdd0c3a..9666f0446 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 | |||
844 | uint8_t *opt_ptr; | 844 | uint8_t *opt_ptr; |
845 | 845 | ||
846 | /* Fill in: msg type, xid, ELAPSED_TIME */ | 846 | /* Fill in: msg type, xid, ELAPSED_TIME */ |
847 | opt_ptr = init_d6_packet(&packet, DHCPREQUEST); | 847 | opt_ptr = init_d6_packet(&packet, D6_MSG_RENEW); |
848 | 848 | ||
849 | /* server id */ | 849 | /* server id */ |
850 | opt_ptr = mempcpy(opt_ptr, client6_data.server_id, client6_data.server_id->len + 2+2); | 850 | 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) | |||
1083 | client_data.sockfd = -1; | 1083 | client_data.sockfd = -1; |
1084 | } | 1084 | } |
1085 | if (new_mode == LISTEN_KERNEL) | 1085 | if (new_mode == LISTEN_KERNEL) |
1086 | client_data.sockfd = udhcp_listen_socket(/*INADDR_ANY,*/ CLIENT_PORT6, client_data.interface); | 1086 | client_data.sockfd = d6_listen_socket(/*INADDR_ANY,*/ CLIENT_PORT6, client_data.interface); |
1087 | else if (new_mode != LISTEN_NONE) | 1087 | else if (new_mode != LISTEN_NONE) |
1088 | client_data.sockfd = d6_raw_socket(client_data.ifindex); | 1088 | client_data.sockfd = d6_raw_socket(client_data.ifindex); |
1089 | /* else LISTEN_NONE: client_data.sockfd stays closed */ | 1089 | /* else LISTEN_NONE: client_data.sockfd stays closed */ |
@@ -1489,6 +1489,7 @@ int udhcpc6_main(int argc UNUSED_PARAM, char **argv) | |||
1489 | if (opt & OPT_l) | 1489 | if (opt & OPT_l) |
1490 | send_d6_info_request(); | 1490 | send_d6_info_request(); |
1491 | else /* send a broadcast renew request */ | 1491 | else /* send a broadcast renew request */ |
1492 | //TODO: send_d6_renew uses D6_MSG_RENEW message, should we use D6_MSG_REBIND here instead? | ||
1492 | send_d6_renew(/*server_ipv6:*/ NULL, requested_ipv6); | 1493 | send_d6_renew(/*server_ipv6:*/ NULL, requested_ipv6); |
1493 | timeout = discover_timeout; | 1494 | timeout = discover_timeout; |
1494 | packet_num++; | 1495 | packet_num++; |