mirror of
https://github.com/PowerShell/openssh-portable.git
synced 2025-07-30 01:05:14 +02:00
include tunnel device path in error message
This commit is contained in:
parent
0ecd20bc9f
commit
e1e97cae19
@ -137,6 +137,7 @@ sys_set_process_rdomain(const char *name)
|
|||||||
|
|
||||||
#if defined(SSH_TUN_LINUX)
|
#if defined(SSH_TUN_LINUX)
|
||||||
#include <linux/if_tun.h>
|
#include <linux/if_tun.h>
|
||||||
|
#define TUN_CTRL_DEV "/dev/net/tun"
|
||||||
|
|
||||||
int
|
int
|
||||||
sys_tun_open(int tun, int mode, char **ifname)
|
sys_tun_open(int tun, int mode, char **ifname)
|
||||||
@ -147,10 +148,9 @@ sys_tun_open(int tun, int mode, char **ifname)
|
|||||||
|
|
||||||
if (ifname != NULL)
|
if (ifname != NULL)
|
||||||
*ifname = NULL;
|
*ifname = NULL;
|
||||||
|
if ((fd = open(TUN_CTRL_DEV, O_RDWR)) == -1) {
|
||||||
if ((fd = open("/dev/net/tun", O_RDWR)) == -1) {
|
debug("%s: failed to open tunnel control device \"%s\": %s",
|
||||||
debug("%s: failed to open tunnel control interface: %s",
|
__func__, TUN_CTRL_DEV, strerror(errno));
|
||||||
__func__, strerror(errno));
|
|
||||||
return (-1);
|
return (-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user