Browse Source

when we get back a IMSG_HOST_DNS message from the parent the peer ID within

might have become invalid (because the peer showed up, dns request sent to
parent, peer vanishes, and then the reply comes back), so do not fatal() in
that case but just log_warnx(). provoked by brad
OPENBSD_3_7
henning 20 years ago
parent
commit
e310ae01b8
1 changed files with 5 additions and 3 deletions
  1. +5
    -3
      src/usr.sbin/ntpd/ntp.c

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

@ -1,4 +1,4 @@
/* $OpenBSD: ntp.c,v 1.34 2004/10/04 11:12:58 henning Exp $ */
/* $OpenBSD: ntp.c,v 1.35 2004/10/13 09:20:41 henning Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@ -285,8 +285,10 @@ ntp_dispatch_imsg(void)
TAILQ_FOREACH(peer, &conf->ntp_peers, entry)
if (peer->id == imsg.hdr.peerid)
break;
if (peer == NULL)
fatal("IMSG_HOST_DNS with invalid peerID");
if (peer == NULL) {
log_warnx("IMSG_HOST_DNS with invalid peerID");
break;
}
if (peer->addr != NULL) {
log_warnx("IMSG_HOST_DNS but addr != NULL!");
break;


Loading…
Cancel
Save