mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-02-10 16:57:00 +08:00
tun: restrict SIOCDIFADDR on non-linux
This commit is contained in:
@@ -550,7 +550,7 @@ void close_tun(main_server_st * s, struct proc_st *proc)
|
||||
void reset_tun(struct proc_st* proc)
|
||||
{
|
||||
if (proc->tun_lease.name[0] != 0) {
|
||||
#ifdef SIOCDIFADDR
|
||||
#if defined(SIOCDIFADDR) && !defined(__linux__)
|
||||
if (proc->ipv4 && proc->ipv4->lip_len > 0) {
|
||||
int fd = socket(AF_INET, SOCK_DGRAM, 0);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user