Browse Source

prevent the tls constraint state machine from getting hung on STATE_INVALID

patch from Mikolaj Kucharski
ok deraadt@
OPENBSD_5_8
bcook 9 years ago
parent
commit
1694f9ed82
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      src/usr.sbin/ntpd/constraint.c

+ 3
- 3
src/usr.sbin/ntpd/constraint.c View File

@ -1,4 +1,4 @@
/* $OpenBSD: constraint.c,v 1.12 2015/05/28 21:34:36 deraadt Exp $ */
/* $OpenBSD: constraint.c,v 1.13 2015/07/18 20:32:38 bcook Exp $ */
/* /*
* Copyright (c) 2015 Reyk Floeter <reyk@openbsd.org> * Copyright (c) 2015 Reyk Floeter <reyk@openbsd.org>
@ -269,7 +269,7 @@ constraint_check_child(void)
if ((cstr = constraint_bypid(pid)) != NULL) { if ((cstr = constraint_bypid(pid)) != NULL) {
if (sig) if (sig)
fatalx("constraint %s, signal %d",
fatalx("constraint %s, signal %d",
log_sockaddr((struct sockaddr *) log_sockaddr((struct sockaddr *)
&cstr->addr->ss), sig); &cstr->addr->ss), sig);
if (fail) { if (fail) {
@ -279,7 +279,7 @@ constraint_check_child(void)
&cstr->addr->ss), CONSTRAINT_SCAN_INTERVAL); &cstr->addr->ss), CONSTRAINT_SCAN_INTERVAL);
} }
if (fail || cstr->state < STATE_REPLY_RECEIVED) {
if (fail || cstr->state < STATE_QUERY_SENT) {
cstr->senderrors++; cstr->senderrors++;
constraint_close(cstr->fd); constraint_close(cstr->fd);
} }


Loading…
Cancel
Save