Skip to content

Commit 81d9105

Browse files
committed
ipmap: m on clear, remove all from unprotected ipset
1 parent 5e25389 commit 81d9105

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

intra/protect/ipmap/ipmap.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,11 @@ func (m *ipmap) Clear() {
212212
n++
213213
}
214214

215+
// Clear the maps after sending all items to the purge channel
216+
clear(m.m)
217+
// Don't clear m.p as it contains protected entries
218+
// Don't clear m.ip as it contains IP address entries
219+
215220
go m.rptr.Clear()
216221
// ipaddr type is not "cleared"
217222
log.I("ipmap: clear: requested %d/%d sets", n, sz)

0 commit comments

Comments
 (0)