aboutsummaryrefslogtreecommitdiff
path: root/contrib/ntp/ntpd/ntp_peer.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/ntp/ntpd/ntp_peer.c')
-rw-r--r--contrib/ntp/ntpd/ntp_peer.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/contrib/ntp/ntpd/ntp_peer.c b/contrib/ntp/ntpd/ntp_peer.c
index 04dee20c8982..a296ea7dd32f 100644
--- a/contrib/ntp/ntpd/ntp_peer.c
+++ b/contrib/ntp/ntpd/ntp_peer.c
@@ -161,7 +161,7 @@ getmorepeermem(void)
int i;
struct peer *peers;
- peers = emalloc_zero(INC_PEER_ALLOC * sizeof(*peers));
+ peers = eallocarray(INC_PEER_ALLOC, sizeof(*peers));
for (i = INC_PEER_ALLOC - 1; i >= 0; i--)
LINK_SLIST(peer_free, &peers[i], p_link);
@@ -309,7 +309,8 @@ findpeer(
for (p = peer_hash[hash]; p != NULL; p = p->adr_link) {
/* [Bug 3072] ensure interface of peer matches */
- if (p->dstadr != rbufp->dstadr)
+ /* [Bug 3356] ... if NOT a broadcast peer! */
+ if (p->hmode != MODE_BCLIENT && p->dstadr != rbufp->dstadr)
continue;
/* ensure peer source address matches */