summaryrefslogtreecommitdiff
path: root/openbsd-compat/port-net.c
diff options
context:
space:
mode:
Diffstat (limited to 'openbsd-compat/port-net.c')
-rw-r--r--openbsd-compat/port-net.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/openbsd-compat/port-net.c b/openbsd-compat/port-net.c
index bb535626f..617bffceb 100644
--- a/openbsd-compat/port-net.c
+++ b/openbsd-compat/port-net.c
@@ -137,6 +137,7 @@ sys_set_process_rdomain(const char *name)
137 137
138#if defined(SSH_TUN_LINUX) 138#if defined(SSH_TUN_LINUX)
139#include <linux/if_tun.h> 139#include <linux/if_tun.h>
140#define TUN_CTRL_DEV "/dev/net/tun"
140 141
141int 142int
142sys_tun_open(int tun, int mode, char **ifname) 143sys_tun_open(int tun, int mode, char **ifname)
@@ -147,10 +148,9 @@ sys_tun_open(int tun, int mode, char **ifname)
147 148
148 if (ifname != NULL) 149 if (ifname != NULL)
149 *ifname = NULL; 150 *ifname = NULL;
150 151 if ((fd = open(TUN_CTRL_DEV, O_RDWR)) == -1) {
151 if ((fd = open("/dev/net/tun", O_RDWR)) == -1) { 152 debug("%s: failed to open tunnel control device \"%s\": %s",
152 debug("%s: failed to open tunnel control interface: %s", 153 __func__, TUN_CTRL_DEV, strerror(errno));
153 __func__, strerror(errno));
154 return (-1); 154 return (-1);
155 } 155 }
156 156