HomeFreeBSD

The connect() system call should return -1 and set errno to EAFNOSUPPORT

Description

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

Details

Provenance
tuexenAuthored on
Reviewer
bz
Differential Revision
D9163: Fix connect() when used fro TCP sockets in combination with IPv4-mapped IPv6 addresses
Parents
rS318648: MFC r318189:
Branches
Unknown
Tags
Unknown