mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-02-10 00:37:00 +08:00
fail when a tun device has no name
This commit is contained in:
@@ -417,6 +417,11 @@ int open_tun(main_server_st * s, struct proc_st *proc)
|
||||
set_cloexec_flag(tunfd, 1);
|
||||
#endif
|
||||
|
||||
if (proc->tun_lease.name[0] == 0) {
|
||||
mslog(s, NULL, LOG_ERR, "tun device with no name!");
|
||||
goto fail;
|
||||
}
|
||||
|
||||
/* set IP/mask */
|
||||
ret = set_network_info(s, proc);
|
||||
if (ret < 0) {
|
||||
|
||||
Reference in New Issue
Block a user