hi all, I would like to ask you for help on how to simulate a 
connection timeout on a local machine. Please cc' me since I'm not on this 
alias.

        I'm working on several RFE's for SSH and one is to resync client 
side ConnectTimeout feature from OpenSSH. That's the easy part - set socket 
as non-blocking, call connect() and then select().

        however, I would like to add a new test case into STC-2 SSH test 
suite. The question is how to simulate a situation where "ssh -o 
ConnectTimeout=5 somehost" will timeout in 5 seconds if I can configure/use 
local machine only.

        I thought about ipfilter on lo0 before I found out that loopback 
cannot be filtered on. I then thought about -blackhole flag. I found out 
that the system responded with "No route to host" when I wanted to connect 
using that route (route add 1.2.3.4 127.0.0.1 -blackhole).

        I guess I might setup two zones and filter between them but I hope 
for an easier solution. The less code to setup a testing environment the 
better. I'm out of ideas. Any help please?

        adding 2nd machine to the STC-2 SSH test suite is also not an 
option, the setup would be then too complicated.

        thank you, Jan.

-- 
Jan Pechanec
_______________________________________________
networking-discuss mailing list
[email protected]

Reply via email to