You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
improve new code selecting connection target by bindaddr family
the code added in 6ecc398 was modified to
- better match the rest of codestyle
- don't print gratuitous warning if no matching addrinfo record was found
- always select outgoing socket type according to first addrinfo result,
like in the past, rather than enforcing the af of bindaddr even if no
matching record exists.
- only call bind() if the selected addrinfo record matches the bind addr
as a sideeffect of the latter, bind() will no longer be called when there's
no DNS record matching the address family of the bindaddr, which means the
connection will use the system default route for the target.
whether this aligns with user's expectations remain to be seen, but imo
it's preferable to make the connection work rather than enforcing that no
packet goes out on another interface than the one specified via bind addr.
0 commit comments