diff options
author | Damien Miller <djm@mindrot.org> | 2020-01-25 16:30:22 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2020-01-25 16:30:22 +1100 |
commit | e1e97cae19ff07b7a7f7e82556bc048c3c54af63 (patch) | |
tree | 5e97e89e900843f05e5fac3d5325611ccd69b822 /openbsd-compat/port-net.c | |
parent | 0ecd20bc9f0b9c7c697c9eb014613516c8f65834 (diff) |
include tunnel device path in error message
Diffstat (limited to 'openbsd-compat/port-net.c')
-rw-r--r-- | openbsd-compat/port-net.c | 8 |
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 | ||
141 | int | 142 | int |
142 | sys_tun_open(int tun, int mode, char **ifname) | 143 | sys_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 | ||