mirror of
https://github.com/python/cpython.git
synced 2026-01-26 12:55:08 +00:00
gh-142991: socketmodule: fixed getsockaddrlen() for PF_DIVERT socket (#142993)
This commit is contained in:
parent
54f1ed0299
commit
05406b221d
@ -0,0 +1,2 @@
|
||||
Fixed socket operations such as recvfrom() and sendto() for FreeBSD
|
||||
divert(4) socket.
|
||||
@ -2769,6 +2769,12 @@ getsockaddrlen(PySocketSockObject *s, socklen_t *len_ret)
|
||||
_Py_FALLTHROUGH;
|
||||
#endif /* AF_RDS */
|
||||
|
||||
#ifdef AF_DIVERT
|
||||
case AF_DIVERT:
|
||||
/* FreeBSD divert(4) sockets use sockaddr_in: fall-through */
|
||||
_Py_FALLTHROUGH;
|
||||
#endif /* AF_DIVERT */
|
||||
|
||||
case AF_INET:
|
||||
{
|
||||
*len_ret = sizeof (struct sockaddr_in);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user