summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Walker <ka0ttic@gentoo.org>2005-03-11 10:46:08 +0000
committerAaron Walker <ka0ttic@gentoo.org>2005-03-11 10:46:08 +0000
commit12ed8ead9f5592c983ad979f3e049ad8c66c3fde (patch)
tree146a1b84eec79595ef96aa4ae5c98d08fed2b79f /net-analyzer/p0f/files
parentRevision bump; added postgres support via USE=postgres for bug 84797. Thanks ... (diff)
downloadhistorical-12ed8ead9f5592c983ad979f3e049ad8c66c3fde.tar.gz
historical-12ed8ead9f5592c983ad979f3e049ad8c66c3fde.tar.bz2
historical-12ed8ead9f5592c983ad979f3e049ad8c66c3fde.zip
Version bump for bug 56640; cleaned up ebuilds, respect CFLAGS, respect FEATURES=nostrip. Also added static support via USE=static for 2.0.5.
Package-Manager: portage-2.0.51.19
Diffstat (limited to 'net-analyzer/p0f/files')
-rw-r--r--net-analyzer/p0f/files/digest-p0f-2.0.51
-rwxr-xr-xnet-analyzer/p0f/files/p0f.initd37
2 files changed, 38 insertions, 0 deletions
diff --git a/net-analyzer/p0f/files/digest-p0f-2.0.5 b/net-analyzer/p0f/files/digest-p0f-2.0.5
new file mode 100644
index 000000000000..07d6ee7ea1cd
--- /dev/null
+++ b/net-analyzer/p0f/files/digest-p0f-2.0.5
@@ -0,0 +1 @@
+MD5 78235749e8ada6ad2b16b40fe15081f6 p0f-2.0.5.tgz 130002
diff --git a/net-analyzer/p0f/files/p0f.initd b/net-analyzer/p0f/files/p0f.initd
new file mode 100755
index 000000000000..09d1ce333b3d
--- /dev/null
+++ b/net-analyzer/p0f/files/p0f.initd
@@ -0,0 +1,37 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/p0f/files/p0f.initd,v 1.1 2005/03/11 10:46:08 ka0ttic Exp $
+
+start() {
+ ebegin "Starting p0f"
+ # The 'tcp and tcp[13] & 2 = 2' requires at least syn set.
+ # An alternative would be 'tcp and tcp[13] & 0x3f = 2', which
+ # is syn and no other major flags (but ECN enabled packets are OK)
+ if [ -z "$BpfFilter" ]; then
+ BpfFilter='tcp and tcp[13] & 2 = 2'
+ else
+ BpfFilter="$BpfFilter and tcp and tcp[13] & 2 = 2"
+ fi
+
+ # The command in backticks returns all the local IP addresses on this machine.
+ for OneIP in `/sbin/ifconfig 2>/dev/null | grep 'inet addr' | sed -e 's/.*addr://' -e 's/ .*//'` ; do
+ BpfFilter="$BpfFilter and not src host $OneIP"
+ done
+
+ # Create a lock file.
+ mkdir -p /var/lock/subsys
+ touch /var/lock/subsys/p0f
+
+ # Start up p0f and filter out all packets originating from any of this machines IP's.
+ einfo "Logfile: ${P0FLOGFILE}"
+ start-stop-daemon --start --quiet --exec /usr/sbin/p0f -- -v "$BpfFilter" >>"/var/log/p0f" 2>&1 &
+ eend ${?}
+}
+
+stop() {
+ ebegin "Stopping p0f"
+ start-stop-daemon --stop --quiet --exec /usr/sbin/p0f
+ rm -f /var/lock/subsys/p0f
+ eend ${?}
+}