[Nagiosplug-devel] Flight 1.4.8, ready for boarding

Thomas Guyot-Sionnest dermoth at aei.ca
Mon Apr 2 09:42:34 CEST 2007

On 02/04/07 01:43 AM, Thomas Guyot-Sionnest wrote:
> Yada yada yada (Sorry for all the spam...)

I found the root cause of one of the problems. In jitter_request it
creates a socket and connect to it (my_udp_connect, ~line 525), but for
some reason I don't understand, that socket use the same port and
sometimes receives a packet from the previous calls. That packet is a
bit different but interpreted as it (no checking on the packet type),
and therefore the jitter runs start with bogus data.

I have no idea how to make the 2nd round of requests start from a
different port, which would prevent any problem with old/late packets.
Another way would be to check the packet type and skip it if it's not
what we expect.

Here's an example. The READSTAT response should have the flags 0x16 just
like the request. In packet captures it look like a NTP packet rather
than a NTP Control packet. The last line (Processing...) is one I added
in my code and should read "13" for that server.

sending READSTAT requestcontrol packet contents:
        flags: 0x16 , 0x01
          li=0 (0x00)
          vn=2 (0x10)
          mode=6 (0x06)
          response=0 (0x00)
          more=0 (0x00)
          error=0 (0x00)
          op=1 (0x01)
        sequence: 1 (0x01)
        status: 0 (0x00)
        assoc: 0 (0x00)
        offset: 0 (0x00)
        count: 0 (0x00)
recieving READSTAT responsecontrol packet contents:
        flags: 0x24 , 0x02
          li=0 (0x00)
          vn=4 (0x20)
          mode=4 (0x04)
          response=0 (0x00)
          more=0 (0x00)
          error=0 (0x00)
          op=2 (0x02)
        sequence: 1261 (0x4ed)
        status: 0 (0x00)
        assoc: 25 (0x19)
        offset: 0 (0x00)
        count: 1050 (0x41a)
Processing 262 peers


More information about the Devel mailing list