From b1cce4ddcbd875c6a7890ae8302e3b16e9d7d4da 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. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13620 Signed-off-by: Andrew Bartlett Reviewed-by: Jeremy Allison --- 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 44d67e7ca84..a9cdf1c5a58 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.17.1