mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-03 19:08:58 +00:00
Utilize IP_BINDANY which provided the same semantics of OpenBSD's
SO_BINDANY.
This commit is contained in:
parent
55909abf07
commit
6856a5e345
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=206689
@ -570,10 +570,8 @@ remote_connect(const char *host, const char *port, struct addrinfo hints)
|
||||
if (sflag || pflag) {
|
||||
struct addrinfo ahints, *ares;
|
||||
|
||||
#ifdef SO_BINDANY
|
||||
/* try SO_BINDANY, but don't insist */
|
||||
setsockopt(s, SOL_SOCKET, SO_BINDANY, &on, sizeof(on));
|
||||
#endif
|
||||
/* try IP_BINDANY, but don't insist */
|
||||
setsockopt(s, IPPROTO_IP, IP_BINDANY, &on, sizeof(on));
|
||||
memset(&ahints, 0, sizeof(struct addrinfo));
|
||||
ahints.ai_family = res0->ai_family;
|
||||
ahints.ai_socktype = uflag ? SOCK_DGRAM : SOCK_STREAM;
|
||||
|
Loading…
Reference in New Issue
Block a user