|
@@ -348,11 +348,6 @@ static int tcp_listen(PAL_HANDLE* handle, char* uri, int options) {
|
|
if (IS_ERR(fd))
|
|
if (IS_ERR(fd))
|
|
return -PAL_ERROR_DENIED;
|
|
return -PAL_ERROR_DENIED;
|
|
|
|
|
|
- if (bind_addr->sa_family == AF_INET6) {
|
|
|
|
- int ipv6only = 1;
|
|
|
|
- INLINE_SYSCALL(setsockopt, 5, fd, SOL_IPV6, IPV6_V6ONLY, &ipv6only, sizeof(int));
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
/* must set the socket to be reuseable */
|
|
/* must set the socket to be reuseable */
|
|
int reuseaddr = 1;
|
|
int reuseaddr = 1;
|
|
INLINE_SYSCALL(setsockopt, 5, fd, SOL_SOCKET, SO_REUSEADDR, &reuseaddr, sizeof(int));
|
|
INLINE_SYSCALL(setsockopt, 5, fd, SOL_SOCKET, SO_REUSEADDR, &reuseaddr, sizeof(int));
|
|
@@ -480,11 +475,6 @@ static int tcp_connect(PAL_HANDLE* handle, char* uri, int options) {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- if (dest_addr->sa_family == AF_INET6) {
|
|
|
|
- int ipv6only = 1;
|
|
|
|
- INLINE_SYSCALL(setsockopt, 5, fd, SOL_IPV6, IPV6_V6ONLY, &ipv6only, sizeof(int));
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
ret = INLINE_SYSCALL(connect, 3, fd, dest_addr, dest_addrlen);
|
|
ret = INLINE_SYSCALL(connect, 3, fd, dest_addr, dest_addrlen);
|
|
|
|
|
|
if (IS_ERR(ret) && ERRNO(ret) == EINPROGRESS) {
|
|
if (IS_ERR(ret) && ERRNO(ret) == EINPROGRESS) {
|
|
@@ -635,11 +625,6 @@ static int udp_bind(PAL_HANDLE* handle, char* uri, int options) {
|
|
if (IS_ERR(fd))
|
|
if (IS_ERR(fd))
|
|
return -PAL_ERROR_DENIED;
|
|
return -PAL_ERROR_DENIED;
|
|
|
|
|
|
- if (bind_addr->sa_family == AF_INET6) {
|
|
|
|
- int ipv6only = 1;
|
|
|
|
- INLINE_SYSCALL(setsockopt, 5, fd, SOL_IPV6, IPV6_V6ONLY, &ipv6only, sizeof(int));
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
ret = INLINE_SYSCALL(bind, 3, fd, bind_addr, bind_addrlen);
|
|
ret = INLINE_SYSCALL(bind, 3, fd, bind_addr, bind_addrlen);
|
|
|
|
|
|
if (IS_ERR(ret)) {
|
|
if (IS_ERR(ret)) {
|
|
@@ -694,11 +679,6 @@ static int udp_connect(PAL_HANDLE* handle, char* uri, int options) {
|
|
if (IS_ERR(fd))
|
|
if (IS_ERR(fd))
|
|
return -PAL_ERROR_DENIED;
|
|
return -PAL_ERROR_DENIED;
|
|
|
|
|
|
- if (dest_addr && dest_addr->sa_family == AF_INET6) {
|
|
|
|
- int ipv6only = 1;
|
|
|
|
- INLINE_SYSCALL(setsockopt, 5, fd, SOL_IPV6, IPV6_V6ONLY, &ipv6only, sizeof(int));
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
if (bind_addr) {
|
|
if (bind_addr) {
|
|
ret = INLINE_SYSCALL(bind, 3, fd, bind_addr, bind_addrlen);
|
|
ret = INLINE_SYSCALL(bind, 3, fd, bind_addr, bind_addrlen);
|
|
|
|
|