[patch] RFC: put server tunnel name in environment
alex at alex.org.uk
Mon Sep 21 22:21:13 EST 2009
If an ssh server receives a tun/tap tunnel request and sets up the tunnel
concerned, as far as I can see there is currently no way for the server
to configure the tunnel in a manner dependent upon (e.g) the key used to
set up the ssh session. Whilst an id based on the key can be passed to
the ssh child process, where the tunnel is dynamically allocated, its
tunnel name is lost.
This patch remedies this. It is very simple. All it does is put the
tunnel name in the environment if one is set up. IE ssh to a server
with "-w any" and the executed command will have (e.g.)
if tun1 was allocated. On *BSD, this will look more like '/dev/tun1'.
I have tested this patch on Linux. It should work equally well on OpenBSD
and FreeBSD (it's really very simple) but someone should test this.
Patch is against 5.1p1.
[this is my first patch against openssh so please go easy]
More information about the openssh-unix-dev