The connect() system call should return -1 and set errno to EAFNOSUPPORT
if it is called on a TCP socket
- with an IPv6 address and the socket is bound to an IPv4-mapped IPv6 address.
- with an IPv4-mapped IPv6 address and the socket is bound to an IPv6 address.
Thanks to Jonathan T. Leighton for reporting this issue.
Reviewed by: bz gnn
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D9163