- tcbdbput(cfg.obj_db, key, klen, &oent, sizeof(oent));
- if (oent.first + cfg.delay < now) {
- if (cfg.do_awl) {
- incr_aent:
- aent.count++;
- aent.last = now;
- tcbdbput(cfg.awl_db, c_addr, c_addrlen, &aent, sizeof(aent));
+ tcbdbput(obj_db, key, klen, &oent, sizeof(oent));
+
+ /* Auto whitelist clients:
+ * algorithm:
+ * - on successful entry in the greylist db of a triplet:
+ * - client not whitelisted yet ? -> increase count
+ * -> withelist if count > limit
+ * - client whitelisted already ? -> update last-seen timestamp.
+ */
+ if (oent.first + greylist_cfg.delay < now) {
+ if (greylist_cfg.client_awl) {
+ INCR_AWL