mirror of
https://github.com/python/cpython.git
synced 2025-12-23 09:19:18 +00:00
gh-142991: socketmodule: fixed getsockaddrlen() for PF_DIVERT socket
This commit is contained in:
parent
08bc03ff2a
commit
fde061609b
2 changed files with 8 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue