[netfilter-cvslog] r3600 - in branches/netfilter-ha/linux-2.6: ct_sync ethereal-plugin/plugins/ctsync

hidden at netfilter.org hidden at netfilter.org
Sun Jan 16 20:59:43 CET 2005


Author: hidden at netfilter.org
Date: 2005-01-16 20:59:42 +0100 (Sun, 16 Jan 2005)
New Revision: 3600

Modified:
   branches/netfilter-ha/linux-2.6/ct_sync/ct_sync_main.c
   branches/netfilter-ha/linux-2.6/ethereal-plugin/plugins/ctsync/packet-ctsync.c
   branches/netfilter-ha/linux-2.6/ethereal-plugin/plugins/ctsync/packet-ctsync.h
Log:
Revision: hidden at sch.bme.hu--2005-public/netfilter-ha--mainline--1.0--patch-21

Handle return value of ip_conntrack_alloc() correctly.

* ct_sync/ct_sync_main.c (ct_sync_msg_process_update_ct):
  ip_conntrack_alloc() returns ERR_PTR(error) if fails, so we must check
  errors with IS_ERR() instead of simply checking if it's NULL


Revision: hidden at sch.bme.hu--2005-public/netfilter-ha--mainline--1.0--patch-22

Update Ethereal dissector plugin.

* ethereal-plugin/plugins/ctsync/packet-ctsync.c: add new message flag
  INITSYNC_DONE

* ethereal-plugin/plugins/ctsync/packet-ctsync.h (struct ct_sync_pkthdr):
  remove unused MGCP structure definitions


Revision: hidden at sch.bme.hu--2005-public/netfilter-ha--mainline--1.0--patch-23

Ethereal dissector include file fix.

* ethereal-plugin/plugins/ctsync/packet-ctsync.h: fixed copyright
  information

* ethereal-plugin/plugins/ctsync/packet-ctsync.c: fixed include paths of
  tap.h and prefs.h


Revision: hidden at sch.bme.hu--2005-public/netfilter-ha--mainline--1.0--patch-24

Fix corrupt empty initsync messages.

* ct_sync/ct_sync_main.c (_send_empty_initsync): use sizeof(struct
  ct_sync_msghdr) instead of CTMSG_SIZEOF(0), since sizeof(0) is 4 and
  thus we're generating invalid packets


Revision: hidden at sch.bme.hu--2005-public/netfilter-ha--mainline--1.0--patch-25

Accept zero length messages as valid.

* ethereal-plugin/plugins/ctsync/packet-ctsync.c (dissect_ctsync_msg):
  don't try to process contents of zero length messages




Modified: branches/netfilter-ha/linux-2.6/ct_sync/ct_sync_main.c
===================================================================
--- branches/netfilter-ha/linux-2.6/ct_sync/ct_sync_main.c	2005-01-14 03:13:02 UTC (rev 3599)
+++ branches/netfilter-ha/linux-2.6/ct_sync/ct_sync_main.c	2005-01-16 19:59:42 UTC (rev 3600)
@@ -545,7 +545,7 @@
 	} else {
 		CT_SYNC_DEBUG("Conntrack entry not found, creating.\n");
 		ct = ip_conntrack_alloc(&dummy_tuple, &dummy_tuple);
-		if (unlikely(ct == NULL)) {
+		if (unlikely(IS_ERR(ct))) {
 			CT_SYNC_DEBUG("Unable to create conntrack entry, ignoring message.\n");
 			CT_SYNC_LEAVE();
 			return -1;
@@ -1177,7 +1177,7 @@
 
 	CT_SYNC_ENTER();
 
-	hdr = (struct ct_sync_msghdr *) cts_proto_want_enqueue(cts_cfg.protoh, &csb, CTMSG_SIZEOF(0));
+	hdr = (struct ct_sync_msghdr *) cts_proto_want_enqueue(cts_cfg.protoh, &csb, sizeof(struct ct_sync_msghdr));
 	if (unlikely(!hdr)) {
 		CT_SYNC_ERR("unable to store create event\n");
 		return 1;

Modified: branches/netfilter-ha/linux-2.6/ethereal-plugin/plugins/ctsync/packet-ctsync.c
===================================================================
--- branches/netfilter-ha/linux-2.6/ethereal-plugin/plugins/ctsync/packet-ctsync.c	2005-01-14 03:13:02 UTC (rev 3599)
+++ branches/netfilter-ha/linux-2.6/ethereal-plugin/plugins/ctsync/packet-ctsync.c	2005-01-16 19:59:42 UTC (rev 3600)
@@ -42,11 +42,11 @@
 #include <string.h>
 #include <epan/packet.h>
 #include <epan/addr_resolv.h>
-#include "prefs.h"
+#include <epan/prefs.h>
 #include <epan/strutil.h>
 #include <epan/conversation.h>
+#include <epan/tap.h>
 #include "packet-ctsync.h"
-#include "../../tap.h"
 
 #ifndef HAVE_WIN32_LIBETHEREAL_LIB
 #include "plugins/plugin_api_defs.h"
@@ -267,6 +267,7 @@
 	{0x00, "None"},
 	{0x01, "New Entry"},
 	{0x02, "Entry is part of Initsync"},
+	{0x04, "Message signals end of Initsync"},
 };
 
 #define CTSYNC_PKTHDR_SIZE	12
@@ -307,6 +308,10 @@
 	proto_tree_add_item(ctsync_msg_tree, hf_ctsync_msg_flags, tvb,
 			    offset+4, 1, FALSE);
 
+	/* empty messages are valid, but don't process contents */
+	if (cts_msg.len == 0)
+		return;
+
 	next_tvb = tvb_new_subset(tvb, offset, cts_msg.len, cts_msg.len);
 	//dissector_next(next_tvb, pinfo, tree);
 	
@@ -454,6 +459,9 @@
 	case 0x04:
 		/* NACK Packet */
 		break;
+	case 0x05:
+		/* INITSYNC_FOLLOWS Packet */
+		break;
 	}
 	
 }

Modified: branches/netfilter-ha/linux-2.6/ethereal-plugin/plugins/ctsync/packet-ctsync.h
===================================================================
--- branches/netfilter-ha/linux-2.6/ethereal-plugin/plugins/ctsync/packet-ctsync.h	2005-01-14 03:13:02 UTC (rev 3599)
+++ branches/netfilter-ha/linux-2.6/ethereal-plugin/plugins/ctsync/packet-ctsync.h	2005-01-16 19:59:42 UTC (rev 3600)
@@ -1,10 +1,9 @@
-/* packet-mgcp.h
- * Routines for mgcp packet disassembly
- * RFC 2705
+/* packet-ctsync.h
+ * Routines for ct_sync packet disassembly
  *
- * $Id: packet-mgcp.h 11400 2004-07-18 00:24:25Z guy $
+ * $Id: packet-ctsync.h 11400 2004-07-18 00:24:25Z guy $
  *
- * Copyright (c) 2000 by Ed Warnicke <hagbard at physics.rutgers.edu>
+ * Copyright (c) 2004 by Harald Welte <laforge at netfilter.org>
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald at ethereal.com>
@@ -27,35 +26,6 @@
 
 #define UDP_PORT_CTSYNC		1999
  
-#if 0
- /* A simple MGCP type that is occasionally handy */
-typedef enum _mgcp_type {
-  MGCP_REQUEST,
-  MGCP_RESPONSE,
-  MGCP_OTHERS
-} mgcp_type_t;
-
-/* Container for tapping relevant data */
-typedef struct _mgcp_info_t {
-  mgcp_type_t mgcp_type;
-  char code[5];
-  guint32 transid;
-  nstime_t req_time;
-  gboolean is_duplicate;
-  gboolean request_available;
-} mgcp_info_t;
-
-/* Item of request list */
-typedef struct _mgcp_call_t {
-	guint32 transid;
-	char code[5];
-	guint32	req_num;	/* frame number request seen */
-	guint32	rsp_num;	/* frame number response seen */
-	nstime_t req_time;
-	gboolean responded;
-} mgcp_call_t;	
-#endif
-
 #define __u8	guint8
 #define __u16	guint16
 struct ct_sync_pkthdr




More information about the netfilter-cvslog mailing list