mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-19 05:37:54 +00:00
Libc: ignore address argument to TCP sendto
Generic code that operates over both UDP and TCP sockets might use 'sendto', but in the case of TCP the destination address ought to be safely discarded. This seems to be the case for certain DNS software that operates over both UDP and TCP. Fix #2807
This commit is contained in:
parent
2b75445ac1
commit
1097a5c7c2
@ -666,7 +666,7 @@ static ssize_t do_sendto(Libc::File_descriptor *fd,
|
||||
/* TODO ECONNRESET */
|
||||
|
||||
try {
|
||||
if (dest_addr) {
|
||||
if (dest_addr && context->proto() == Context::Proto::UDP) {
|
||||
try {
|
||||
Sockaddr_string addr_string(host_string(*(sockaddr_in const *)dest_addr),
|
||||
port_string(*(sockaddr_in const *)dest_addr));
|
||||
|
Loading…
Reference in New Issue
Block a user