Skip to content

Commit

Permalink
dhcp6: Print destination ip on sendto() errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
niklata committed Oct 25, 2022
1 parent 56a129e commit 24b7106
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dhcp6.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -877,7 +877,7 @@ void D6Listener::process_receive(char *buf, std::size_t buflen,
sao.sin6_port = htons(546);
size_t slen = ss.si > sbuf ? static_cast<size_t>(ss.si - sbuf) : 0;
if (safe_sendto(fd_(), sbuf, slen, 0, reinterpret_cast<const sockaddr *>(&sao), sizeof sao) < 0) {
log_line("dhcp6: sendto failed on %s: %s", ifname_.c_str(), strerror(errno));
log_line("dhcp6: sendto (%s) failed on %s: %s", sip_str, ifname_.c_str(), strerror(errno));
return;
}
}
Expand Down

0 comments on commit 24b7106

Please sign in to comment.