Browse Source

fix printing when the pool is specified as an IP address; reported by and

ok deraadt@
OPENBSD_6_6
otto 5 years ago
parent
commit
005e327f50
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      src/usr.sbin/ntpd/control.c

+ 2
- 2
src/usr.sbin/ntpd/control.c View File

@ -1,4 +1,4 @@
/* $OpenBSD: control.c,v 1.16 2019/07/07 19:17:40 otto Exp $ */
/* $OpenBSD: control.c,v 1.17 2019/07/10 05:53:37 otto Exp $ */
/* /*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@ -353,7 +353,7 @@ build_show_peer(struct ctl_show_peer *cp, struct ntp_peer *p)
if (p->addr_head.pool) if (p->addr_head.pool)
pool = "from pool "; pool = "from pool ";
if (0 != strcmp(a, p->addr_head.name))
if (0 != strcmp(a, p->addr_head.name) || p->addr_head.pool)
addr_head_name = p->addr_head.name; addr_head_name = p->addr_head.name;
snprintf(cp->peer_desc, sizeof(cp->peer_desc), snprintf(cp->peer_desc, sizeof(cp->peer_desc),


Loading…
Cancel
Save