aboutsummaryrefslogtreecommitdiff
path: root/networking/udhcp/d6_packet.c
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2025-05-19 08:34:32 +0100
committerRon Yorston <rmy@pobox.com>2025-05-19 08:34:32 +0100
commit64bf69893bd99c305d13a956389f216e7d15c682 (patch)
tree7fa7d449f0633c86c1248c0bb86363dd9f46da38 /networking/udhcp/d6_packet.c
parenta807cdfa95cf4af2f84e207ed15887cc3514cb43 (diff)
parent5f07327251c93184dfcfc8d978fc35705930ec53 (diff)
downloadbusybox-w32-merge.tar.gz
busybox-w32-merge.tar.bz2
busybox-w32-merge.zip
Merge branch 'busybox' into mergemerge
Diffstat (limited to '')
-rw-r--r--networking/udhcp/d6_packet.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/networking/udhcp/d6_packet.c b/networking/udhcp/d6_packet.c
index 142de9b43..1d7541948 100644
--- a/networking/udhcp/d6_packet.c
+++ b/networking/udhcp/d6_packet.c
@@ -153,13 +153,15 @@ int FAST_FUNC d6_send_kernel_packet_from_client_data_ifindex(
153 } 153 }
154 setsockopt_reuseaddr(fd); 154 setsockopt_reuseaddr(fd);
155 155
156 memset(&sa, 0, sizeof(sa)); 156 if (src_ipv6) {
157 sa.sin6_family = AF_INET6; 157 memset(&sa, 0, sizeof(sa));
158 sa.sin6_port = htons(source_port); 158 sa.sin6_family = AF_INET6;
159 sa.sin6_addr = *src_ipv6; /* struct copy */ 159 sa.sin6_port = htons(source_port);
160 if (bind(fd, (struct sockaddr *)&sa, sizeof(sa)) == -1) { 160 sa.sin6_addr = *src_ipv6; /* struct copy */
161 msg = "bind(%s)"; 161 if (bind(fd, (struct sockaddr *)&sa, sizeof(sa)) == -1) {
162 goto ret_close; 162 msg = "bind(%s)";
163 goto ret_close;
164 }
163 } 165 }
164 166
165 memset(&sa, 0, sizeof(sa)); 167 memset(&sa, 0, sizeof(sa));