Assume non-broken recvmsg
This commit is contained in:
@@ -1591,26 +1591,8 @@ build_msghdr_recv(isc__socket_t *sock, char *cmsgbuf, isc_socketevent_t *dev,
|
||||
|
||||
if (sock->type == isc_sockettype_udp) {
|
||||
memset(&dev->address, 0, sizeof(dev->address));
|
||||
#ifdef BROKEN_RECVMSG
|
||||
if (sock->pf == AF_INET) {
|
||||
msg->msg_name = (void *)&dev->address.type.sin;
|
||||
msg->msg_namelen = sizeof(dev->address.type.sin6);
|
||||
} else if (sock->pf == AF_INET6) {
|
||||
msg->msg_name = (void *)&dev->address.type.sin6;
|
||||
msg->msg_namelen = sizeof(dev->address.type.sin6);
|
||||
#ifdef ISC_PLATFORM_HAVESYSUNH
|
||||
} else if (sock->pf == AF_UNIX) {
|
||||
msg->msg_name = (void *)&dev->address.type.sunix;
|
||||
msg->msg_namelen = sizeof(dev->address.type.sunix);
|
||||
#endif
|
||||
} else {
|
||||
msg->msg_name = (void *)&dev->address.type.sa;
|
||||
msg->msg_namelen = sizeof(dev->address.type);
|
||||
}
|
||||
#else
|
||||
msg->msg_name = (void *)&dev->address.type.sa;
|
||||
msg->msg_namelen = sizeof(dev->address.type);
|
||||
#endif
|
||||
} else { /* TCP */
|
||||
msg->msg_name = NULL;
|
||||
msg->msg_namelen = 0;
|
||||
|
||||
Reference in New Issue
Block a user