Created attachment 160609 [details] patch Recent update of openladap-sasl-client changed the sendto(2) "tolen" argument from: sendto(..., dst, sizeof(sruct sockaddr)); to: sendto(..., dst, sizeof(struct sockaddr_storage)); On FreeBSD with UDP sockets this change is invalid. FreeBSD's getsockaddr() will copyin((dst, sa, len); and then set sa->sa_len = len. With the above change sa_len will be 128. Later in in_pcbconnect_setup() this socket address will be rejected with EINVAL because sa_len != sizeof(struct sockaddr_in) Patch openldap's liblber to always issue a the sendto(2) as follows: sendto(..., dst, dst->sa_len); This fixes both IPv4 and IPv6 sockaddrs in a manner compatible with the kernel's getsockaddr() semantics.
Looks good to me. I'll commit this one with a PORTREVISION bump.
Committed, thanks!
A commit references this bug: Author: delphij Date: Wed Sep 2 01:46:16 UTC 2015 New revision: 395815 URL: https://svnweb.freebsd.org/changeset/ports/395815 Log: Use sa_len instead of sizeof(struct sockaddr_storage) to work around a FreeBSD kernel check, which would return EINVAL when the passed length is larger than desired. PR: ports/202819 Submitted by: brd Changes: head/net/openldap24-server/Makefile head/net/openldap24-server/files/patch-libraries__liblber__sockbuf.c