rpms/tcpflow/F-7 tcpflow-0.21-color.patch, 1.1, 1.2 tcpflow.spec, 1.1, 1.2

Terje Røsten (terjeros) fedora-extras-commits at redhat.com
Fri May 2 11:02:48 UTC 2008


Author: terjeros

Update of /cvs/extras/rpms/tcpflow/F-7
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv7793/F-7

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/F-7/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	3 Dec 2007 22:24:38 -0000	1.1
+++ tcpflow-0.21-color.patch	2 May 2008 11:02:11 -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/F-7/tcpflow.spec,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- tcpflow.spec	3 Dec 2007 22:24:38 -0000	1.1
+++ tcpflow.spec	2 May 2008 11:02:11 -0000	1.2
@@ -1,7 +1,7 @@
 Summary:   Network traffic recorder
 Name:      tcpflow
 Version:   0.21
-Release:   2%{?dist}
+Release:   4%{?dist}
 License:   GPL+
 Group:     Applications/Internet
 URL:       http://www.circlemud.org/~jelson/software/tcpflow/
@@ -44,6 +44,12 @@
 %{_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
+
 * Tue Nov 27 2007 Terje Rosten <terje.rosten at ntnu.no> - 0.21-2
 - fix license
 




More information about the fedora-extras-commits mailing list