Fix tun device usage on *BSD.

SIOCSIFADDR is deprecated on *BSD. Instead, use SIOCAIFADDR to
add an alias. Also destroy the tun device with SIOCIFDESTROY when
the client disconnects.
This commit is contained in:
Brian Chu
2014-06-02 17:21:13 +00:00
committed by Nikos Mavrogiannopoulos
parent 264114e799
commit de0388a3f7
3 changed files with 76 additions and 2 deletions

View File

@@ -201,6 +201,8 @@ void remove_proc(main_server_st * s, struct proc_st *proc, unsigned k)
proc->cookie_ptr->proc = NULL;
}
close_tun(s, proc);
talloc_free(proc);
}