git: libssh: Define SSH_TUN_COMPAT_AF to fix tun(4)-based tunnel feature

Aaron LI aly at crater.dragonflybsd.org
Thu Oct 8 21:54:52 PDT 2026


commit 06d94267609af69188f670c64af6dce7c7dd45c9
Author: Aaron LI <aly at aaronly.me>
Date:   Fri Oct 9 08:53:04 2026 +0800

    libssh: Define SSH_TUN_COMPAT_AF to fix tun(4)-based tunnel feature
    
    ssh supports to use tun(4) to create a layer-3 tunnel.  Our tun(4) works
    in the same way as FreeBSD's, so define SSH_TUN_COMPAT_AF and fix
    if_tun.h inclusion to enable TUNSIFHEAD and AF header conversion.
    
    However, this feature only works with logging as the root user, due to a
    permission restriction in tun(4) that needs to be removed.
    
    Also, this feature is disabled by default and requires manually setting
    'PermitTunnel yes' in sshd_config.

Summary of changes:
 lib/libssh/config.h                        | 2 +-
 lib/libssh/openbsd-compat/openbsd-compat.h | 2 ++
 lib/libssh/openbsd-compat/port-net.c       | 1 +
 3 files changed, 4 insertions(+), 1 deletion(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/06d94267609af69188f670c64af6dce7c7dd45c9


-- 
DragonFly BSD source repository


More information about the Commits mailing list