NTPClient icon indicating copy to clipboard operation
NTPClient copied to clipboard

Malformed NTP request

Open lkollasch opened this issue 8 years ago • 3 comments

FYI, the following is perhaps intended to spell "INIT" code but unfortunately without the "0x" prefix some values are unintended decimal representation resulting in the nonsensical ASCII code "1N14".

packetBuffer[12] = 49; packetBuffer[13] = 0x4E; packetBuffer[14] = 49; packetBuffer[15] = 52;

lkollasch avatar Jan 30 '17 17:01 lkollasch

Well spotted, but it's not clear to me that this actually matters. Given that the reference type is zero (unspecified) and the reference timestamp is zero, it's almost certainly ignored. Do you have a suggestion for a better value?

blackketter avatar Jan 30 '17 22:01 blackketter

packetBuffer[12] = 0x49; packetBuffer[13] = 0x4E; packetBuffer[14] = 0x49; packetBuffer[15] = 0x52;

lkollasch avatar Jan 30 '17 23:01 lkollasch

packetBuffer[12] = 0x49; packetBuffer[13] = 0x4E; packetBuffer[14] = 0x49; packetBuffer[15] = 0x52;

This is INIR isn't it ? should be packetBuffer[15] = 0x54;

vpapanik avatar May 07 '22 19:05 vpapanik