summaryrefslogtreecommitdiffstats
path: root/common/socket.c
AgeCommit message (Collapse)AuthorFilesLines
2020-06-08socket: Fix IPv6 scope id lookup logic to handle another network device problemGravatar Martin Szulecki1-2/+12
The lookup logic preferred to return the last suitable scope id match. This became a problem if there was already a suitable scope id match before that was higher in the interface list. This now chooses the higher last scope id interface match and thus probably in the routing preference.
2020-06-06socket: Improve IPv6 scope id detection to fix network devices on OSXGravatar Martin Szulecki1-6/+24
The helper should now also work for loopback addresses and prefer any initially supplied scope id to maintain routing information if possible. Otherwise it just picks the best suitable route. Let us see if this is stable enough to prevent us from adding routing table parsing cruft and other logic...
2020-06-06socket: Use common IPv6 scope values and correct loopback scope to link-localGravatar Martin Szulecki1-4/+4
2020-06-06common: Fix socket_connect_addr() not connecting using IPv6 in some casesGravatar Martin Szulecki1-0/+107
This extends the socket helper with functions to determine the "scope" and a suitable "scope id" of an IPv6 address. Now socket_connect_addr() does not trust the provided IPv6 "scope id" and always attempts to determine it using the new helpers. This became a requirement during testing with remote usbmux connections that provide a different "scope id" and thus might cause IPv6 routing to not work at all. Thus the "scope id" is only valid per host.
2020-05-18common: Update socket.c/.h from libusbmuxdGravatar Nikias Bassen1-21/+214
2020-01-05Define ETIMEDOUT if requiredGravatar Nikias Bassen1-0/+3
2019-06-13socket: Return -ETIMEDOUT when select() in socket_read_fd() reached the timeoutGravatar Nikias Bassen1-0/+4
2019-05-21common: Update socket.c to match the one from libusbmuxdGravatar Nikias Bassen1-55/+160
2015-12-29common: [security fix] Make sure sockets only listen locallyGravatar Joshua Hill1-2/+2
2015-01-28Remove trailing whitespace errors from all filesGravatar Martin Szulecki1-3/+3
2013-03-20move thread and socket code to "common" subdirGravatar Nikias Bassen1-0/+392