aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorAdam Vandenberg2010-08-09 09:18:44 -0700
committerAdam Vandenberg2010-08-09 09:18:44 -0700
commit498c09f69dba8d4282f6f58a0724c56fad7cd8e7 (patch)
tree641446863f7f5bc899c57386bd2055885761f48c /Library/Formula
parentb882b3fa2191ab0b2a50eabd98a96f7656de49d4 (diff)
downloadhomebrew-498c09f69dba8d4282f6f58a0724c56fad7cd8e7.tar.bz2
tcpflow - enable loopback [aparajita]
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/tcpflow.rb22
1 files changed, 22 insertions, 0 deletions
diff --git a/Library/Formula/tcpflow.rb b/Library/Formula/tcpflow.rb
index aef9eebff..d03f12931 100644
--- a/Library/Formula/tcpflow.rb
+++ b/Library/Formula/tcpflow.rb
@@ -36,3 +36,25 @@ __END__
/* set the current to the maximum or specified value */
if (max_desired_fds)
limit.rlim_cur = max_desired_fds;
+
+--- a/src/datalink.c 2002-03-29 18:19:03.000000000 -0500
++++ b/src/datalink.c 2010-08-06 17:40:55.000000000 -0400
+@@ -49,6 +49,9 @@
+ * DLT_NULL is used by the localhost interface. */
+ #define NULL_HDRLEN 4
+
++/* loopback family */
++#define AF_LOOPBACK 0x2000000
++
+ void dl_null(u_char *user, const struct pcap_pkthdr *h, const u_char *p)
+ {
+ u_int caplen = h->caplen;
+@@ -72,7 +75,7 @@
+ /* make sure this is AF_INET */
+ memcpy((char *)&family, (char *)p, sizeof(family));
+ family = ntohl(family);
+- if (family != AF_INET) {
++ if (family != AF_INET && family != AF_LOOPBACK) {
+ DEBUG(6) ("warning: received non-AF_INET null frame (type %d)", family);
+ return;
+ }