aboutsummaryrefslogtreecommitdiff
path: root/net-mgmt/p0f
diff options
context:
space:
mode:
authorPav Lucistnik <pav@FreeBSD.org>2004-04-03 16:07:44 +0000
committerPav Lucistnik <pav@FreeBSD.org>2004-04-03 16:07:44 +0000
commitb832d227c35b3c8a1e3d777edb03c40d3964dfc9 (patch)
treec49b390183c3ab43ca6f887dbbe9d9ce2f13782e /net-mgmt/p0f
parentedc0522e0e6ae7c0b30c27e5c1732d17038b53f6 (diff)
downloadports-b832d227c35b3c8a1e3d777edb03c40d3964dfc9.tar.gz
ports-b832d227c35b3c8a1e3d777edb03c40d3964dfc9.zip
Readd changes which was lost in repocopy of this port from net to net-mgmt:
Makefile rev 1.15 Install the p0fa.fp and p0fr.fp files, needed when the -A and -R options are used (new PORTREVISION). PR: 62273 Submitted by: Radim Kolar files/patch-p0f.c rev 1.3 On FreeBSD, the loopback interface is normally called lo0. PR: 62358 Submitted by: Radim Kolar files/patch-mtu.h rev 1.5 files/patch-p0f.c rev 1.1 more patches to add loopback support PR: 62274 Submitted by: Radim Kolar Reported by: Radim Kolar <hsn@netmag.cz> Pointy hat (XL size) to: wollman
Notes
Notes: svn path=/head/; revision=106051
Diffstat (limited to 'net-mgmt/p0f')
-rw-r--r--net-mgmt/p0f/Makefile9
-rw-r--r--net-mgmt/p0f/files/patch-mtu.h14
-rw-r--r--net-mgmt/p0f/files/patch-p0f.c43
3 files changed, 64 insertions, 2 deletions
diff --git a/net-mgmt/p0f/Makefile b/net-mgmt/p0f/Makefile
index 462a28d62ff9..09fe204b02a4 100644
--- a/net-mgmt/p0f/Makefile
+++ b/net-mgmt/p0f/Makefile
@@ -7,6 +7,7 @@
PORTNAME= p0f
PORTVERSION= 2.0.3
+PORTREVISION= 1
CATEGORIES= net-mgmt
MASTER_SITES= http://lcamtuf.coredump.cx/p0f/
EXTRACT_SUFX= .tgz
@@ -33,7 +34,9 @@ do-install:
.endfor
${INSTALL_SCRIPT} ${WRKSRC}/p0frep ${PREFIX}/bin
${MKDIR} ${PREFIX}/etc/p0f
- ${INSTALL_DATA} ${WRKSRC}/p0f.fp ${PREFIX}/etc/p0f
+.for ii in . a. r.
+ ${INSTALL_DATA} ${WRKSRC}/p0f${ii}fp ${PREFIX}/etc/p0f/
+.endfor
${INSTALL_MAN} ${WRKSRC}/p0f.1 ${MANPREFIX}/man/man1/
.if !defined(NOPORTDOCS)
${MKDIR} ${DOCSDIR}
@@ -47,7 +50,9 @@ pre-install:
.for ii in p0f p0frep p0fq sendack sendack2 sendsyn
${ECHO_CMD} bin/${ii} >> ${PLIST}
.endfor
- ${ECHO_CMD} etc/p0f/p0f.fp >> ${PLIST}
+.for ii in . a. r.
+ ${ECHO_CMD} etc/p0f/p0f${ii}fp >> ${PLIST}
+.endfor
${ECHO_CMD} "@dirrm etc/p0f" >> ${PLIST}
.if !defined(NOPORTDOCS)
.for i in ${DOCFILES}
diff --git a/net-mgmt/p0f/files/patch-mtu.h b/net-mgmt/p0f/files/patch-mtu.h
new file mode 100644
index 000000000000..116c1ae95371
--- /dev/null
+++ b/net-mgmt/p0f/files/patch-mtu.h
@@ -0,0 +1,14 @@
+$FreeBSD$
+Add loopback support for FreeBSD.
+author: Radim Kolar
+
+--- mtu.h.orig Fri Oct 10 20:56:39 2003
++++ mtu.h Tue Feb 17 21:10:49 2004
+@@ -58,6 +58,7 @@
+ { 4352, "FDDI" },
+ { 4500, "token ring (2)" },
+ { 9180, "FORE ATM" },
++ { 16384, "loopback" },
+ { 16436, "sometimes loopback" },
+ { 18000, "token ring x4" },
+ };
diff --git a/net-mgmt/p0f/files/patch-p0f.c b/net-mgmt/p0f/files/patch-p0f.c
new file mode 100644
index 000000000000..449f830730e7
--- /dev/null
+++ b/net-mgmt/p0f/files/patch-p0f.c
@@ -0,0 +1,43 @@
+$FreeBSD$
+Add loopback support for FreeBSD.
+author: Radim Kolar
+
+--- p0f.c.orig Tue Feb 17 21:11:51 2004
++++ p0f.c Tue Feb 17 21:10:48 2004
+@@ -161,7 +161,8 @@
+
+ switch(type) {
+
+- case DLT_NULL:
++ case DLT_NULL: header_len=4; break;
++
+ case DLT_SLIP:
+ case DLT_RAW: break;
+
+@@ -1199,11 +1200,15 @@
+ /* Whoops, IP header ends past end_ptr */
+ if ((_u8*)(iph + 1) > end_ptr) return;
+
+- if ( ((iph->ihl & 0x40) != 0x40) || iph->proto != IPPROTO_TCP) {
+- debug("[!] WARNING: Non-IP packet received. Bad header_len!\n");
++ if ( iph->proto != IPPROTO_TCP) {
++ debug("[!] WARNING: Non-IP packet received.\n");
+ return;
+ }
+
++ if ( ((iph->ihl & 0x40) != 0x40) ) {
++ debug("[!] WARNING: Bad header_len!\n");
++ return;
++ }
+ /* If the declared length is shorter than the snapshot (etherleak
+ or such), truncate this bad boy. */
+
+@@ -1590,7 +1595,7 @@
+ if (!use_iface) use_iface=pcap_lookupdev(errbuf);
+ #endif /* ^WIN32 */
+
+- if (!use_iface) use_iface = "lo";
++ if (!use_iface) use_iface = "lo0";
+
+ /* We do not rely on pcap timeouts - they suck really bad. Of
+ course, the documentation sucks, and if you use the timeout