rpms/tcpflow/devel tcpflow-0.21-color.patch, 1.1, 1.2 tcpflow.spec, 1.2, 1.3
Terje Røsten (terjeros)
fedora-extras-commits at redhat.com
Fri May 2 10:57:06 UTC 2008
Author: terjeros
Update of /cvs/extras/rpms/tcpflow/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv997
Modified Files:
tcpflow-0.21-color.patch tcpflow.spec
Log Message:
* Fri May 2 2008 Terje Rosten <terje.rosten at ntnu.no> - 0.21-4
- fix color patch (bz #444833)
tcpflow-0.21-color.patch:
Index: tcpflow-0.21-color.patch
===================================================================
RCS file: /cvs/extras/rpms/tcpflow/devel/tcpflow-0.21-color.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- tcpflow-0.21-color.patch 28 Nov 2007 21:05:36 -0000 1.1
+++ tcpflow-0.21-color.patch 2 May 2008 10:56:29 -0000 1.2
@@ -1,4 +1,7 @@
-+++ tcpflow-0.21/src/main.c
+Add new options -C and -e requested by Debian users.
+
+--- a/src/main.c
++++ b/src/main.c
@@ -70,7 +70,9 @@
int max_flows = 0;
int max_desired_fds = 0;
@@ -50,8 +53,8 @@
default:
DEBUG(1) ("error: unrecognized switch '%c'", optopt);
need_usage = 1;
---- tcpflow-0.21.orig/src/tcpip.c
-+++ tcpflow-0.21/src/tcpip.c
+--- a/src/tcpip.c
++++ b/src/tcpip.c
@@ -55,8 +55,10 @@
#include "tcpflow.h"
@@ -84,7 +87,7 @@
/* fill in the flow_t structure with info that identifies this flow */
this_flow.src = src;
this_flow.dst = dst;
-@@ -150,15 +147,37 @@
+@@ -150,15 +147,45 @@
data += tcp_header_len;
length -= tcp_header_len;
@@ -100,10 +103,18 @@
+ * - SYN/ACK means that the flow is a server -> client flow. */
+ if ((state->isn - seq) == 0) {
+ if (IS_SET(tcp_header->th_flags, TH_SYN)
-+ && IS_SET(tcp_header->th_flags, TH_ACK))
++ && IS_SET(tcp_header->th_flags, TH_ACK)) {
+ SET_BIT(state->flags, FLOW_DIR_SC);
-+ else if (IS_SET(tcp_header->th_flags, TH_SYN))
++ DEBUG(50) ("packet is handshake SYN/ACK");
++ /* If the SYN flag is set the first data byte is offset by one,
++ account for it (note: if we're here we have just created
++ state, so it's safe to change isn). */
++ state->isn++;
++ } else if (IS_SET(tcp_header->th_flags, TH_SYN)) {
+ SET_BIT(state->flags, FLOW_DIR_CS);
++ DEBUG(50) ("packet is handshake SYN");
++ state->isn++;
++ }
+ }
+ DEBUG(50) ("got TCP segment with no data");
+ return;
@@ -124,7 +135,7 @@
}
}
-@@ -186,27 +205,45 @@
+@@ -186,26 +213,46 @@
/* print the contents of this packet to the console */
@@ -172,15 +183,15 @@
- /* see if we have state about this flow; if not, create it */
- if ((state = find_flow_state(flow)) == NULL) {
- state = create_flow_state(flow, seq);
-- }
+ /* If we got a SYN reset the sequence number */
-+ if (syn_set)
++ if (syn_set) {
++ DEBUG(50) ("resetting isn due to extra SYN");
+ state->isn = seq - state->pos + 1;
+ }
/* if we're done collecting for this flow, return now */
- if (IS_SET(state->flags, FLOW_FINISHED))
---- tcpflow-0.21.orig/src/tcpflow.h
-+++ tcpflow-0.21/src/tcpflow.h
+--- a/src/tcpflow.h
++++ b/src/tcpflow.h
@@ -82,6 +82,10 @@
#define FLOW_FINISHED (1 << 0)
#define FLOW_FILE_EXISTS (1 << 1)
@@ -206,8 +217,8 @@
u_char *do_strip_nonprint(const u_char *data, u_int32_t length);
/* flow.c */
---- tcpflow-0.21.orig/doc/tcpflow.1.in
-+++ tcpflow-0.21/doc/tcpflow.1.in
+--- a/doc/tcpflow.1.in
++++ b/doc/tcpflow.1.in
@@ -6,7 +6,7 @@
.na
.B tcpflow
Index: tcpflow.spec
===================================================================
RCS file: /cvs/extras/rpms/tcpflow/devel/tcpflow.spec,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- tcpflow.spec 9 Feb 2008 16:07:05 -0000 1.2
+++ tcpflow.spec 2 May 2008 10:56:29 -0000 1.3
@@ -1,7 +1,7 @@
Summary: Network traffic recorder
Name: tcpflow
Version: 0.21
-Release: 3%{?dist}
+Release: 4%{?dist}
License: GPL+
Group: Applications/Internet
URL: http://www.circlemud.org/~jelson/software/tcpflow/
@@ -44,6 +44,9 @@
%{_mandir}/man1/%{name}*
%changelog
+* Fri May 2 2008 Terje Rosten <terje.rosten at ntnu.no> - 0.21-4
+- fix color patch (bz #444833)
+
* Sat Feb 9 2008 Terje Rosten <terje.rosten at ntnu.no> - 0.21-3
- rebuild
More information about the fedora-extras-commits
mailing list