Browse Source

respond to zero-mode NTPv1 packets

master
Miroslav Lichvar 4 years ago
parent
commit
74b9f4a283
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      src/main.rs

+ 2
- 1
src/main.rs 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> {


Loading…
Cancel
Save