Skip to content

Commit b1afedf

Browse files
committed
security/openssh-portable: Use SSH_TUN_COMPAT_AF to fix ssh tun device
forwarding interoperability with other OSes. See also: openssh/openssh-portable#588
1 parent 53a40f0 commit b1afedf

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed

security/openssh-portable/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
PORTNAME= openssh
22
DISTVERSION= 10.0p1
3-
PORTREVISION= 1
3+
PORTREVISION= 2
44
PORTEPOCH= 1
55
CATEGORIES= security
66
MASTER_SITES= OPENBSD/OpenSSH/portable
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
commit 57e76d9b31fd5a5c08e20fd128b09d01e4980274
2+
Author: Maxim Khon <[email protected]>
3+
Date: Mon Aug 18 12:05:42 2025 +0000
4+
5+
Use SSH_TUN_COMPAT_AF on FreeBSD. Otherwise tun forwarding from other OSes
6+
fails as soon as the first IPv6 message is sent by the other side
7+
(which is usually a Router Solicitation ICMPv6 message which is sent as soon
8+
as the interface is up): all other OS'es use SSH_TUN_COMPAT_AF or SSH_TUN_PREPEND_AF
9+
which effectively uses OpenBSD AF_INET/AF_INET6 values.
10+
11+
diff --git a/configure.ac b/configure.ac
12+
index 460ebd3b4..d274d1ab0 100644
13+
--- configure.ac.orig
14+
+++ configure.ac
15+
@@ -1092,6 +1092,8 @@ mips-sony-bsd|mips-sony-newsos4)
16+
*-*-freebsd*)
17+
AC_DEFINE([LOCKED_PASSWD_PREFIX], ["*LOCKED*"], [Account locked with pw(1)])
18+
AC_DEFINE([SSH_TUN_FREEBSD], [1], [Open tunnel devices the FreeBSD way])
19+
+ AC_DEFINE([SSH_TUN_COMPAT_AF], [1],
20+
+ [Use tunnel device compatibility to OpenBSD])
21+
AC_CHECK_HEADER([net/if_tap.h], ,
22+
AC_DEFINE([SSH_TUN_NO_L2], [1], [No layer 2 tunnel support]))
23+
AC_DEFINE([BROKEN_GLOB], [1], [FreeBSD glob does not do what we need])

0 commit comments

Comments
 (0)