Yahoo Groups archive

Milter-greylist

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

Thread

[PATCH] Avoid warnings when p0f is unconfigured

[PATCH] Avoid warnings when p0f is unconfigured

2009-02-14 by Enrico Scholz

There was no way to turn off

| milter-greylist: Cannot connect to p0f socket ""

messages when program was compiled with p0f support and there is no
p0f daemon available/configured.

Such a situation is common e.g. when providing generic binary packages
in a Linux distribution.

This patch skips p0f operations when 'p0fsock' is empty.

Index: milter-greylist-4.2b1/p0f.c
===================================================================
--- milter-greylist-4.2b1.orig/p0f.c
+++ milter-greylist-4.2b1/p0f.c
@@ -284,6 +284,9 @@ p0f_reconnect(void)
 	if (p0fsock != -1)
 		return 0;
 
+	if (!conf.c_p0fsock[0])	/* return silently when p0f is not configured */
+		return -1;
+
 	if ((p0fsock = socket(PF_UNIX,SOCK_STREAM,0)) == -1) {
 		mg_log(LOG_ERR, "socket(PF_UNIX, SOCK_STREAM, 0) failed");
 		exit(EX_OSERR);

Re: [milter-greylist] [PATCH] Avoid warnings when p0f is unconfigured

2009-02-21 by manu@netbsd.org

Enrico Scholz <enrico.scholz@...-chemnitz.de> wrote:

> messages when program was compiled with p0f support and there is no
> p0f daemon available/configured.
> 
> Such a situation is common e.g. when providing generic binary packages
> in a Linux distribution.
> 
> This patch skips p0f operations when 'p0fsock' is empty.

Checked in.

-- 
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
manu@...

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.