aboutsummaryrefslogtreecommitdiff
path: root/net/tcpflow
diff options
context:
space:
mode:
authorSam Lawrance <lawrance@FreeBSD.org>2005-12-13 05:49:05 +0000
committerSam Lawrance <lawrance@FreeBSD.org>2005-12-13 05:49:05 +0000
commite54afcd72b3ea654bd8020fd9e9f01dd3f93d4e7 (patch)
tree83d766e3d980bfaac92232c46de2eae8bfde6ac6 /net/tcpflow
parent99aa0b0bdfd4665f15cb1cc84fa6f896f7aa2f6c (diff)
downloadports-e54afcd72b3ea654bd8020fd9e9f01dd3f93d4e7.tar.gz
ports-e54afcd72b3ea654bd8020fd9e9f01dd3f93d4e7.zip
Notes
Diffstat (limited to 'net/tcpflow')
-rw-r--r--net/tcpflow/Makefile1
-rw-r--r--net/tcpflow/files/patch-datalink.c26
2 files changed, 27 insertions, 0 deletions
diff --git a/net/tcpflow/Makefile b/net/tcpflow/Makefile
index dda5a049604f..6c21d8f0ba35 100644
--- a/net/tcpflow/Makefile
+++ b/net/tcpflow/Makefile
@@ -7,6 +7,7 @@
PORTNAME= tcpflow
PORTVERSION= 0.21
+PORTREVISION= 1
CATEGORIES= net
MASTER_SITES= ftp://ftp.circlemud.org/pub/jelson/tcpflow/
diff --git a/net/tcpflow/files/patch-datalink.c b/net/tcpflow/files/patch-datalink.c
new file mode 100644
index 000000000000..32df9f1d5efd
--- /dev/null
+++ b/net/tcpflow/files/patch-datalink.c
@@ -0,0 +1,26 @@
+--- src/datalink.c.orig Mon May 9 12:00:38 2005
++++ src/datalink.c Mon May 9 12:23:47 2005
+@@ -42,6 +42,13 @@
+
+ #include "tcpflow.h"
+
++/*
++ * Byte-swap a 32-bit number.
++ * ("htonl()" or "ntohl()" won't work - we want to byte-swap even on
++ * big-endian platforms.)
++ */
++#define SWAPLONG(y) \
++((((y)&0xff)<<24) | (((y)&0xff00)<<8) | (((y)&0xff0000)>>8) | (((y)>>24)&0xff))
+
+
+ /* The DLT_NULL packet header is 4 bytes long. It contains a network
+@@ -71,7 +78,8 @@
+ #ifndef DLT_NULL_BROKEN
+ /* make sure this is AF_INET */
+ memcpy((char *)&family, (char *)p, sizeof(family));
+- family = ntohl(family);
++ // family = ntohl(family);
++ if ((family & 0xFFFF0000) != 0) family = SWAPLONG(family);
+ if (family != AF_INET) {
+ DEBUG(6) ("warning: received non-AF_INET null frame (type %d)", family);
+ return;