summaryrefslogtreecommitdiff
path: root/openbsd-compat/port-net.c
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2020-02-21 11:57:14 +0000
committerColin Watson <cjwatson@debian.org>2020-02-21 14:27:02 +0000
commit886e47e745586c34e81cfd5c5fb9b5dbc8e84d04 (patch)
treedd6c3b4dc64a17c520af7aaf213163f8a0a63e56 /openbsd-compat/port-net.c
parentac2b4c0697fcac554041ab95f81736887eadf6ec (diff)
parenta2dabf35ce0228c86a288d11cc847a9d9801604f (diff)
New upstream release (8.2p1)
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