aboutsummaryrefslogtreecommitdiff
path: root/net-mgmt/p0f/files
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/files
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/files')
-rw-r--r--net-mgmt/p0f/files/patch-mtu.h14
-rw-r--r--net-mgmt/p0f/files/patch-p0f.c43
2 files changed, 57 insertions, 0 deletions
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