From 85e65819557dcfb9243c93c0a1b8773a51efe001 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Mon, 17 Sep 2018 12:45:14 -0700 Subject: [PATCH] s3: nmbd: Stop nmbd network announce storm. Correct fix for. On announce, work->lastannounce_time is set to current time t, so we must check that 't >= work->lastannounce_time', not 't > work->lastannounce_time' otherwise we end up not doing the comparison, and always doing the announce. Reported by Reuben Farrelly BUG: https://bugzilla.samba.org/show_bug.cgi?id=13620 Signed-off-by: Andrew Bartlett Reviewed-by: Jeremy Allison Revviewe-by: Andreas Schneider (cherry picked from commit 1d1cd28adaba691ba434a47031fb52ff8887c728) --- source3/nmbd/nmbd_sendannounce.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/nmbd/nmbd_sendannounce.c b/source3/nmbd/nmbd_sendannounce.c index 44d67e7..a9cdf1c 100644 --- a/source3/nmbd/nmbd_sendannounce.c +++ b/source3/nmbd/nmbd_sendannounce.c @@ -288,7 +288,7 @@ void announce_my_server_names(time_t t) } /* Announce every minute at first then progress to every 12 mins */ - if (t > work->lastannounce_time && + if (t >= work->lastannounce_time && (t - work->lastannounce_time) < work->announce_interval) { continue; } -- 2.7.4