diff options
| -rw-r--r-- | networking/ntpd.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/networking/ntpd.c b/networking/ntpd.c index d721fe80c..44e711232 100644 --- a/networking/ntpd.c +++ b/networking/ntpd.c | |||
| @@ -2025,6 +2025,15 @@ recv_and_process_peer_pkt(peer_t *p) | |||
| 2025 | 2025 | ||
| 2026 | offset = 0; | 2026 | offset = 0; |
| 2027 | 2027 | ||
| 2028 | /* The below can happen as follows: | ||
| 2029 | * = we receive two peer rsponses at once. | ||
| 2030 | * = recv_and_process_peer_pkt(PEER1) -> update_local_clock() | ||
| 2031 | * -> step_time() and it closes all other fds, sets all ->fd to -1. | ||
| 2032 | * = recv_and_process_peer_pkt(PEER2) sees PEER2->fd == -1 | ||
| 2033 | */ | ||
| 2034 | if (p->p_fd < 0) | ||
| 2035 | return; | ||
| 2036 | |||
| 2028 | /* We can recvfrom here and check from.IP, but some multihomed | 2037 | /* We can recvfrom here and check from.IP, but some multihomed |
| 2029 | * ntp servers reply from their *other IP*. | 2038 | * ntp servers reply from their *other IP*. |
| 2030 | * TODO: maybe we should check at least what we can: from.port == 123? | 2039 | * TODO: maybe we should check at least what we can: from.port == 123? |
