From 40bbc591ab4230ce37a786624e99bdd6ba4d25d0 Mon Sep 17 00:00:00 2001 From: Wesley Shields Date: Fri, 6 Jan 2012 21:01:18 +0000 Subject: [PATCH] Add support for pflog interfaces. Adjust chunk statements in the patch while here. Submitted by: Clayton Milos (via ports@ list) --- net-mgmt/p0f/Makefile | 1 + net-mgmt/p0f/files/patch-p0f.c | 21 +++++++++++++++++---- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/net-mgmt/p0f/Makefile b/net-mgmt/p0f/Makefile index f239168e2c71..772b7c1dcf7e 100644 --- a/net-mgmt/p0f/Makefile +++ b/net-mgmt/p0f/Makefile @@ -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/ diff --git a/net-mgmt/p0f/files/patch-p0f.c b/net-mgmt/p0f/files/patch-p0f.c index 902098e03f2c..3b7816f0934b 100644 --- a/net-mgmt/p0f/files/patch-p0f.c +++ b/net-mgmt/p0f/files/patch-p0f.c @@ -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 ++#include ++#include + 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 */