Yahoo Groups archive

Milter-greylist

Index last updated: 2026-04-28 23:32 UTC

Message

Re: [milter-greylist] milter-greylist and p0f: socket dialog problem

2013-12-05 by Jim Klimov

On 2013-12-05 17:50, Jim Klimov wrote:
> Hello all,
>
> This is a question about p0f, since I can't seem to contact its
> author, and I hoped someone in the milter-greylist community has
> any experience with it too (version 3.06b).

FWIW, I added this check to p0f.c:979 and it worked for me:

           if (i < 0) PFATAL("read() on API socket fails despite POLLIN.");

+          if (i == 0) {
+            pfds[cur].revents |= POLLHUP;
+            pfds[cur].revents |= POLLERR;
+            DEBUG("[#] API connection on fd[%d]=%d has ended: read 
returned zero.\n",
+                cur, pfds[cur].fd);
+          }

           ctable[cur]->in_off += i;


The flags involved are checked a bit later as the condition for closed
dialog and invoke the logic to tear its server side down.

No more CPU hogging now :)

Still hope for comments whether this was the right thing to do...

//Jim

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.