Codebase list tcpflow / 4b27114
patch update: removed patches accepted upstream Dima Kogan 8 years ago
8 changed file(s) with 13 addition(s) and 206 deletion(s). Raw diff Collapse all Expand all
77 src/scan_http.cpp | 2 +-
88 2 files changed, 3 insertions(+), 9 deletions(-)
99
10 diff --git a/src/Makefile.am b/src/Makefile.am
11 index 67a6fa4..a80fc09 100644
12 --- a/src/Makefile.am
13 +++ b/src/Makefile.am
14 @@ -75,18 +75,12 @@ tcpflow_SOURCES = \
15 scan_wifiviz.cpp \
10 Index: tcpflow/src/Makefile.am
11 ===================================================================
12 --- tcpflow.orig/src/Makefile.am
13 +++ tcpflow/src/Makefile.am
14 @@ -88,18 +88,12 @@ tcpflow_SOURCES = \
15 scan_netviz.cpp \
1616 pcap_writer.h \
1717 iptree.h \
1818 - http-parser/http_parser.c \
3232 wifipcap/README.txt \
3333 wifipcap/TimeVal.cpp \
3434 wifipcap/TimeVal.h \
35 diff --git a/src/scan_http.cpp b/src/scan_http.cpp
36 index 78abb98..2460694 100644
37 --- a/src/scan_http.cpp
38 +++ b/src/scan_http.cpp
35 Index: tcpflow/src/scan_http.cpp
36 ===================================================================
37 --- tcpflow.orig/src/scan_http.cpp
38 +++ tcpflow/src/scan_http.cpp
3939 @@ -11,7 +11,7 @@
4040 #include "tcpip.h"
4141 #include "tcpdemux.h"
+0
-71
debian/patches/0002-added-configure-option-to-disable-libcairo.patch less more
0 From: Dima Kogan <dima@secretsauce.net>
1 Date: Sat, 24 May 2014 14:55:27 -0700
2 Subject: added configure option to disable libcairo
3 Forwarded: yes. merged upstream at https://github.com/simsong/tcpflow/commit/dcd8a9422f7919de17eb44d0f6f256b919df113b
4
5 ---
6 configure.ac | 43 +++++++++++++++++++++++++------------------
7 1 file changed, 25 insertions(+), 18 deletions(-)
8
9 diff --git a/configure.ac b/configure.ac
10 index c6dab00..883cd9a 100644
11 --- a/configure.ac
12 +++ b/configure.ac
13 @@ -285,32 +285,39 @@ AC_LANG_POP()
14 ################################################################
15 # drawing support via cairo
16 #
17 +cairo=test
18 +AC_ARG_ENABLE([cairo],[ --enable-cairo=false to disable libcairo even if present])
19 + if test "${enable_cairo}" = false ; then
20 + cairo=false
21 + fi
22
23 -# Cairo requires these to be explicitly included on mingw (and perhaps others):
24 -AC_CHECK_LIB([expat],[XML_ParserCreate])
25 -AC_CHECK_LIB([pixman-1],[pixman_region_init])
26 -AC_CHECK_LIB([bz2],[BZ2_bzDecompress])
27 -AC_CHECK_LIB([freetype],[FT_Init_FreeType]) # requires bz2
28 -AC_CHECK_LIB([fontconfig],[FcBlanksCreate]) # requires freetype expat
29 +if test $cairo = test ; then
30 + # Cairo requires these to be explicitly included on mingw (and perhaps others):
31 + AC_CHECK_LIB([expat],[XML_ParserCreate])
32 + AC_CHECK_LIB([pixman-1],[pixman_region_init])
33 + AC_CHECK_LIB([bz2],[BZ2_bzDecompress])
34 + AC_CHECK_LIB([freetype],[FT_Init_FreeType]) # requires bz2
35 + AC_CHECK_LIB([fontconfig],[FcBlanksCreate]) # requires freetype expat
36
37 -AC_CHECK_HEADERS([cairo/cairo.h cairo/cairo-pdf.h])
38 -AC_CHECK_HEADERS([cairo.h cairo-pdf.h])
39 -AC_CHECK_LIB([cairo],[cairo_create], , [
40 - AC_MSG_WARN([
41 -*** cairo libraries not detected.
42 -*** Please install cairo-devel to get 1-page PDF summary generation.
43 -])
44 - Fmissing_library="cairo-devel $missing_library "
45 - Umissing_library="libcairo2-dev $missing_library "
46 - Mmissing_library="cairo-devel "
47 -])
48 + AC_CHECK_HEADERS([cairo/cairo.h cairo/cairo-pdf.h])
49 + AC_CHECK_HEADERS([cairo.h cairo-pdf.h])
50 + AC_CHECK_LIB([cairo],[cairo_create], , [
51 + AC_MSG_WARN([
52 + *** cairo libraries not detected.
53 + *** Please install cairo-devel to get 1-page PDF summary generation.
54 + ])
55 + Fmissing_library="cairo-devel $missing_library "
56 + Umissing_library="libcairo2-dev $missing_library "
57 + Mmissing_library="cairo-devel "
58 + ])
59 +fi
60
61 ################################################################
62 # pcap support. A bit more involved than normal due to the error message
63 #
64 pcap=test
65 AC_ARG_ENABLE([pcap],[ --enable-pcap=false to disable libpcap even if present])
66 - if test "${enableval}" = false ; then
67 + if test "${enable_pcap}" = false ; then
68 pcap=false
69 fi
70
+0
-28
debian/patches/0003-fixed-handling-of-fputc.patch less more
0 From: Simson Garfinkel <simsong@acm.org>
1 Date: Sun, 16 Feb 2014 11:24:01 -0500
2 Subject: fixed handling of fputc
3 Forwarded: yes. merged upstream at https://github.com/simsong/tcpflow/commit/6cfe1a4905b8801084ecff00ae794388128501af
4
5 ---
6 src/tcpip.cpp | 8 +++++++-
7 1 file changed, 7 insertions(+), 1 deletion(-)
8
9 diff --git a/src/tcpip.cpp b/src/tcpip.cpp
10 index 603c127..ecad602 100644
11 --- a/src/tcpip.cpp
12 +++ b/src/tcpip.cpp
13 @@ -262,7 +262,13 @@ void tcpip::print_packet(const u_char *data, uint32_t length)
14 else if(demux.opt.output_strip_nonprint){
15 for(const u_char *cc = data;cc<data+length;cc++){
16 if(isprint(*cc) || (*cc=='\n') || (*cc=='\r')){
17 - written += fputc(*cc,stdout);
18 + int ret = fputc(*cc,stdout);
19 + if(ret==EOF){
20 + std::cerr << "EOF on write to stdout\n";
21 + exit(1);
22 +
23 + }
24 + written += ret;
25 }
26 }
27 }
+0
-21
debian/patches/0004-fixed-handling-of-fputc.patch less more
0 From: Simson Garfinkel <simsong@acm.org>
1 Date: Sun, 16 Feb 2014 13:48:41 -0500
2 Subject: fixed handling of fputc
3 Forwarded: yes. merged upstream at https://github.com/simsong/tcpflow/commit/1aa7d8e5072175859b0a3c41264c84de14b25e55
4 ---
5 src/tcpip.cpp | 2 +-
6 1 file changed, 1 insertion(+), 1 deletion(-)
7
8 diff --git a/src/tcpip.cpp b/src/tcpip.cpp
9 index ecad602..86ad6df 100644
10 --- a/src/tcpip.cpp
11 +++ b/src/tcpip.cpp
12 @@ -268,7 +268,7 @@ void tcpip::print_packet(const u_char *data, uint32_t length)
13 exit(1);
14
15 }
16 - written += ret;
17 + written += 1;
18 }
19 }
20 }
+0
-24
debian/patches/0005-fixed-per-https-bugs.debian.org-cgi-bin-bugreport.cg.patch less more
0 From: Simson Garfinkel <simsong@acm.org>
1 Date: Fri, 30 May 2014 07:07:50 -0400
2 Subject: fixed per https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=736417
3 Forwarded: yes. merged upstream at https://github.com/simsong/tcpflow/commit/7df3db6874fb1a596c1e9673eabaf15be81e59be
4
5 ---
6 src/tcpip.cpp | 3 ++-
7 1 file changed, 2 insertions(+), 1 deletion(-)
8
9 diff --git a/src/tcpip.cpp b/src/tcpip.cpp
10 index 86ad6df..8a37413 100644
11 --- a/src/tcpip.cpp
12 +++ b/src/tcpip.cpp
13 @@ -268,8 +268,9 @@ void tcpip::print_packet(const u_char *data, uint32_t length)
14 exit(1);
15
16 }
17 - written += 1;
18 }
19 + written += 1; // treat even unprintable characters as "written". It
20 + // really means "processed"
21 }
22 }
23 else {
+0
-44
debian/patches/0006-fixed-so-that-it-properly-gets-default-device-if-no-.patch less more
0 From: Simson Garfinkel <simsong@acm.org>
1 Date: Sun, 2 Feb 2014 16:18:45 -0500
2 Subject: fixed so that it properly gets default device if no -i is given
3 Forwarded: yes. merged upstream at https://github.com/simsong/tcpflow/commit/9abeb43451fff5543efdac769d1efea52d4dd084
4
5 ---
6 src/tcpflow.cpp | 10 +++++-----
7 1 file changed, 5 insertions(+), 5 deletions(-)
8
9 diff --git a/src/tcpflow.cpp b/src/tcpflow.cpp
10 index 96bd38e..f5bd746 100644
11 --- a/src/tcpflow.cpp
12 +++ b/src/tcpflow.cpp
13 @@ -25,9 +25,6 @@
14 #include <sys/types.h>
15 #include <dirent.h>
16
17 -
18 -
19 -
20 /* bring in inet_ntop if it is not present */
21 #define ETH_ALEN 6
22 #ifndef HAVE_INET_NTOP
23 @@ -388,7 +385,7 @@ int main(int argc, char *argv[])
24 #endif
25
26 bool force_binary_output = false;
27 - const char *device = "<default>";
28 + const char *device = 0; // default device
29 const char *lockname = 0;
30 int need_usage = 0;
31 std::string reportfilename;
32 @@ -649,7 +646,10 @@ int main(int argc, char *argv[])
33 be13::plugin::get_scanner_feature_file_names(feature_file_names);
34 feature_recorder_set fs(0);
35
36 - fs.init(feature_file_names,input_fname.size()>0 ? input_fname : device,demux.outdir);
37 + const char *name = device;
38 + if(input_fname.size()>0) name=input_fname.c_str();
39 + if(name==0) name="<default>";
40 + fs.init(feature_file_names,name,demux.outdir);
41 the_fs = &fs;
42 demux.fs = &fs;
43
99
1010 Index: tcpflow/src/be13_api/bulk_extractor_i.h
1111 ===================================================================
12 --- tcpflow.orig/src/be13_api/bulk_extractor_i.h 2014-01-12 23:57:16.202181700 -0800
13 +++ tcpflow/src/be13_api/bulk_extractor_i.h 2014-01-12 23:57:45.030324635 -0800
14 @@ -279,7 +279,7 @@
12 --- tcpflow.orig/src/be13_api/bulk_extractor_i.h
13 +++ tcpflow/src/be13_api/bulk_extractor_i.h
14 @@ -278,7 +278,7 @@ namespace be13 {
1515 uint16_t th_win; /* window */
1616 uint16_t th_sum; /* checksum */
1717 uint16_t th_urp; /* urgent pointer */
00 0001-using-the-debian-package-of-libhttp-parser-instead-o.patch
1 0002-added-configure-option-to-disable-libcairo.patch
2 0003-fixed-handling-of-fputc.patch
3 0004-fixed-handling-of-fputc.patch
4 0005-fixed-per-https-bugs.debian.org-cgi-bin-bugreport.cg.patch
5 0006-fixed-so-that-it-properly-gets-default-device-if-no-.patch
61 packing-struct-tcphdr-to-improve-portability.patch