mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-02-10 08:46:58 +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);
|
set_cloexec_flag(tunfd, 1);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if (proc->tun_lease.name[0] == 0) {
|
||||||
|
mslog(s, NULL, LOG_ERR, "tun device with no name!");
|
||||||
|
goto fail;
|
||||||
|
}
|
||||||
|
|
||||||
/* set IP/mask */
|
/* set IP/mask */
|
||||||
ret = set_network_info(s, proc);
|
ret = set_network_info(s, proc);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user