summaryrefslogtreecommitdiff
path: root/source3/nmbd
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2018-09-17 12:45:14 -0700
committerAndrew Bartlett <abartlet@samba.org>2018-09-19 22:25:05 +0200
commit1d1cd28adaba691ba434a47031fb52ff8887c728 (patch)
tree65947554709701eb7f1c85a2509cc09f079fbbda /source3/nmbd
parent2e59a3343fe162639b103f35ac87b3193927fab5 (diff)
downloadsamba-1d1cd28adaba691ba434a47031fb52ff8887c728.tar.gz
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 <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Revviewe-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'source3/nmbd')
-rw-r--r--source3/nmbd/nmbd_sendannounce.c2
1 files changed, 1 insertions, 1 deletions
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;
}