From 5a256bc727b4094cb0f07cdeb10e148ce08ff534 Mon Sep 17 00:00:00 2001 From: Nikos Mavrogiannopoulos Date: Wed, 15 Apr 2015 15:35:56 +0300 Subject: [PATCH] tun: restrict SIOCDIFADDR on non-linux --- src/tun.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tun.c b/src/tun.c index dc414527..ae4d3fb9 100644 --- a/src/tun.c +++ b/src/tun.c @@ -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);