ExitOnForwardFailure and Protocol 2.0

Darren Tucker dtucker at zip.com.au
Wed Sep 27 11:29:26 EST 2006


William Ahern wrote:
> On Wed, Sep 27, 2006 at 10:45:54AM +1000, Darren Tucker wrote:
>> William Ahern wrote:
>>> I'm merging my "streamlocal" unix domain socket forwarding patch into 4.4p1
>>> (or rather 20060926 SNAP) and I gather that the ExitOnForwardFailure
>>> capability only works for protocol 1.0.
>>>
>>> Am I misreading things? I was really looking forward to that feature.
>> I think so, I use ExitOnForwardFailure with protocol 2 all the time.
[...]
> Interesting. Then line 2543 of channels.c is confusing me:
> 
> 	packet_start(SSH2_MSG_GLOBAL_REQUEST);
> 	packet_put_cstring("tcpip-forward");
> 	packet_put_char(1);			/* boolean: want reply */
> 	packet_put_cstring(address_to_bind);
> 	packet_put_int(listen_port);
> 	packet_send();
> 	packet_write_wait();
> 	/* Assume that server accepts the request */
> 	success = 1;

The client sets "want reply", so if the server rejects the request then 
the client will find out about it when the reply comes back.  This is 
handled in ssh.c:client_global_request_reply_fwd().

-- 
Darren Tucker (dtucker at zip.com.au)
GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4  37C9 C982 80C7 8FF4 FA69
     Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.



More information about the openssh-unix-dev mailing list