Add support for pflog interfaces. Adjust chunk statements in the patch

while here.

Submitted by:	Clayton Milos <clay@milos.co.za> (via ports@ list)
This commit is contained in:
Wesley Shields 2012-01-06 21:01:18 +00:00
parent 4946089698
commit 40bbc591ab
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=288646
2 changed files with 18 additions and 4 deletions

View File

@ -7,6 +7,7 @@
PORTNAME= p0f
PORTVERSION= 2.0.8
PORTREVISION= 1
CATEGORIES= net-mgmt security
MASTER_SITES= http://lcamtuf.coredump.cx/p0f/ \
http://farrokhi.net/distfiles/

View File

@ -1,6 +1,19 @@
--- p0f.c.orig Sun Jul 11 02:17:57 2004
+++ p0f.c Sun Feb 12 01:44:36 2006
@@ -1238,11 +1238,15 @@
--- p0f.c.orig 2006-08-21 10:16:00.000000000 -0400
+++ p0f.c 2012-01-06 15:46:38.918380578 -0500
@@ -212,8 +212,11 @@
#endif
#ifdef DLT_PFLOG
+#include <net/if.h>
+#include <sys/queue.h>
+#include <net/if_pflog.h>
case DLT_PFLOG:
- header_len=28;
+ header_len=PFLOG_HDRLEN;
break;
#endif
@@ -1281,11 +1284,15 @@
/* Whoops, IP header ends past end_ptr */
if ((_u8*)(iph + 1) > end_ptr) return;
@ -18,7 +31,7 @@
/* If the declared length is shorter than the snapshot (etherleak
or such), truncate this bad boy. */
@@ -1632,7 +1636,7 @@
@@ -1699,7 +1706,7 @@
if (!use_iface) use_iface=pcap_lookupdev(errbuf);
#endif /* ^WIN32 */