Make failed TUN socket operation non-fatal
It might be desirable to run the UE without superuser rights. More concretely, it might run without NET_ADMIN. In this case, various corresponding operations on the TUN socket fd might fail. In this commit, - improve error reports to make them more clear - do not automatically exit(1), but return from the function to ensure continuity of the softmodem
This commit is contained in:
@@ -144,7 +144,7 @@ int netlink_init_tun(char *ifprefix, int num_if, int id) {//for UE, id = 1, 2, .
|
||||
|
||||
if (nas_sock_fd[i] == -1) {
|
||||
LOG_E(PDCP, "TUN: Error opening socket %s (%d:%s)\n",ifname,errno, strerror(errno));
|
||||
exit(1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
LOG_I(PDCP, "TUN: Opened socket %s with fd nas_sock_fd[%d]=%d\n",
|
||||
|
||||
Reference in New Issue
Block a user