if((sd = socket(PF_INET, SOCK_STREAM, 0)) 1)
{
perror("Socket Creation");
//log_msg(LOG_ERR, "Socket creation failed");
return ERROR_SOCKET;
}
if ( connect(sd, addr, sizeof(addr)) == 0 )
{
conn_success = 1;
break;
}
else
{
log_msg(LOG_ERR, "errno = %d, %s", errno, strerror(errno));
}
The above chunk of C code is used to open TCP sockets on public and private servers on many platforms including Android and Mac OS. On iOS, it works if the device, an XR running 14.4.2, has an internal IP address when connecting to a public server. However, if the XR has a public IP address as it does when not connected to wifi, it fails with this in the log calling the same public server (or any public server) and errno = 1, Operation not permitted:
Sandbox: extension name(5616) deny(1) network-outbound*:port no
Why does the network extension, a packet tunnel provider, connect to a public server when the device has a private IP address and denied network outbound access when it has a public IP address?
12
0
3.2k