- (djm) [misc.c] Disable tunnel code for non-OpenBSD (for now), enable
again by providing a sys_tun_open() function for your platform and
setting the CUSTOM_SYS_TUN_OPEN define. More work is required to match
OpenBSD's tunnel protocol, which prepends the address family to the
packet
diff --git a/misc.c b/misc.c
index 4f41332..4141e6c 100644
--- a/misc.c
+++ b/misc.c
@@ -541,6 +541,9 @@
int
tun_open(int tun, int mode)
{
+#if defined(CUSTOM_SYS_TUN_OPEN)
+ return (sys_tun_open(tun, mode));
+#elif defined(SSH_TUN_BSD)
struct ifreq ifr;
char name[100];
int fd = -1, sock;
@@ -594,6 +597,10 @@
debug("%s: failed to set %s mode %d: %s", __func__, name,
mode, strerror(errno));
return (-1);
+#else
+ error("Tunnel interfaces are not supported on this platform");
+ return (-1);
+#endif
}
void