Yahoo Groups archive

Milter-greylist

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

Thread

[PATCH] bad p0f src-port byteorder

[PATCH] bad p0f src-port byteorder

2011-03-17 by Enrico Scholz

Hi,

current milter-greylist (both CVS and 4.2.6) transmit the src port in
the p0f query in the wrong byteorder; dst port is transmitted correctly
due to a programming bug (duplicate htons() calls) ;)

p0f expects ports in host byteorder, the ips in network byteorder.
E.g. p0f-2.0.8's p0f.c file[1] contains:

|    find_match(
|      ...
|      /* src */   iph->saddr,
|      /* dst */   iph->daddr,
|      /* sp */    ntohs(tcph->sport),
|      /* dp */    ntohs(tcph->dport),
|     ...


Patch can be found at

  http://pkgs.fedoraproject.org/gitweb/?p=milter-greylist.git;a=blob;f=p0f-srcport.patch;hb=HEAD

Footnotes: 
[1]  http://www.stearns.org/p0f/p0f.c



Enrico

Re: [milter-greylist] [PATCH] bad p0f src-port byteorder

2011-03-20 by manu@netbsd.org

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

> Patch can be found at
>
http://pkgs.fedoraproject.org/gitweb/?p=milter-greylist.git;a=blob;f=p0f
-srcport.patch;hb=HEAD

Got it!

-- 
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.