respond to zero-mode NTPv1 packets

This commit is contained in:
Miroslav Lichvar 2018-04-06 08:29:44 +02:00
parent af4bed9262
commit 74b9f4a283
1 changed files with 2 additions and 1 deletions

View File

@ -178,7 +178,8 @@ impl NtpPacket {
}
fn is_request(&self) -> bool {
self.mode == 1 || self.mode == 3
self.mode == 1 || self.mode == 3 ||
(self.mode == 0 && self.version == 1 && self.remote_addr.port() != 123)
}
fn make_response(&self, state: &NtpServerState) -> Option<NtpPacket> {