[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
UDP socket tests useless
From: |
Nils Ohlmeier |
Subject: |
UDP socket tests useless |
Date: |
Fri, 9 Aug 2002 21:10:05 +0200 |
User-agent: |
KMail/1.4.2 |
Hello,
as i already wrote a few weeks ago to Jan-Henrik the udp socket connection
test (without protocol test) is sadely useless. But here on the list are
amybe a few more guys which know the problems of udp sockets ;-)
In detail: if i'm not wrong a udp connection test like in the documentation
('port 53 use type udp') will create a udp socket with the gvien destination.
If the creation of this socket was successful a connect call will be made on
this socket. On a stream (tcp) socket this call will establish a connection
to the destination (SYN, ACKSYN, ACK), but on a datagram (udp) socket this
call won't make any network traffic.
Finaly a select call will be made on the socket to look for any error. But
because their was no network traffic on a udp socket until now, the select
won't return an error.
To prove the above simply create a check entry for monit with a 'port x use
type udp', where x is any udp port on your host where no application is
listen (e.g. 'port 9 use type udp'). The connection test will always succeed
although no application is listen.
Deduction: a udp connection test without protocol test is useless.
As minimal consequence the documentation should be updated (remove the udp
port 53 example, and maybe mention the udp socket connection problem).
IMHO the best solution would be that monit rejects any udp connection test
wihtout a protocol test in its confirguration file.
Regards
Nils Ohlmeier