HomeFreeBSD

tcp, udp: Permit binding with AF_UNSPEC if the address is INADDR_ANY

Description

tcp, udp: Permit binding with AF_UNSPEC if the address is INADDR_ANY

Prior to commit f161d294b we only checked the sockaddr length, but now
we verify the address family as well. This breaks at least ttcp. Relax
the check to avoid breaking compatibility too much: permit AF_UNSPEC if
the address is INADDR_ANY.

Fixes: f161d294b
Reported by: Bakul Shah <bakul@iitbombay.org>
Reviewed by: tuexen
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D30539

Details

Provenance
markjAuthored on May 31 2021, 10:53 PM
Reviewer
tuexen
Differential Revision
D30539: tcp, udp: Permit binding with AF_UNSPEC if the address is INADDR_ANY
Parents
rG18f55c67f746: x86: Fix lapic_ipi_alloc() on i386
Branches
Unknown
Tags
Unknown