[Nagiosplug-devel] check_udp

Andreas Ericsson ae at op5.se
Thu Mar 23 06:38:15 CET 2006


Ton Voon wrote:
> 
> On 23 Mar 2006, at 14:21, Andreas Ericsson wrote:
> 
>> Ton Voon wrote:
>>
>>>   ln -s check_tcp check_udp
>>>   ./check_udp -H localhost -p 3333     # will always return OK.  Is  
>>> this right?
>>
>>
>> No.
> 
> 
> Way hey! Tests (even manual ones) do work then!
> 
> Do you have a patch, since you're much cleverer than me when it comes  
> to udp stuff.
> 

Sorry, no. There's no way of checking for open UDP ports without sending 
data and getting some sort of response.

> 
>>>   ./check_udp -H 10.10.10.10 -p 3333   # will always return OK.  Is  
>>> this right if the host does not exist?
>>
>>
>> No, it will not. If there's no route to the target host connect()  
>> will return -1 and set errno to ENOROUTE, which I expect will be  
>> detected.
> 
> 
> This is currently returning OK, so that must be a bug. Could you  patch 
> please?
> 

I expect you have a default route on your workstation, in which case it 
will return OK.

> What about if the ip is routable (say, in the same subnet), but not  
> actually responding. Would you expect this to fail?
> 

Yes and no. For that to happen you must trigger some sort of response.

-- 
Andreas Ericsson                   andreas.ericsson at op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231




More information about the Devel mailing list