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
Sponsored by: The FreeBSD Foundation

(cherry picked from commit f96603b56f0f74fa52d8f1ef0be869fca7305b99)

Details

Provenance
markjAuthored on May 31 2021, 10:53 PM
Parents
rGe539e7a0954b: ktrace: Handle negative array sizes in ktrstructarray
Branches
Unknown
Tags
Unknown