aboutsummaryrefslogtreecommitdiffstats
path: root/packet-ncp2222.inc
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2003-09-25 11:27:24 +0000
committerGuy Harris <guy@alum.mit.edu>2003-09-25 11:27:24 +0000
commit490cadfcd037abae3bda6d9941409efc8a354d37 (patch)
tree0801cdbcec0463bf6006f46fe313f6e3c7715cc6 /packet-ncp2222.inc
parentffa946f21557cfa1efed4c4956fc0e6d45fa3be0 (diff)
In "nds_defrag()", handle "request_value->ncp_rec" being null.
In "dissect_nds_request()", insert the request information into the hash table the first time we see the packet, regardless of whether we created a new conversation or not. svn path=/trunk/; revision=8541
Diffstat (limited to 'packet-ncp2222.inc')
-rw-r--r--packet-ncp2222.inc13
1 files changed, 7 insertions, 6 deletions
diff --git a/packet-ncp2222.inc b/packet-ncp2222.inc
index befc4ea5b1..f128834d85 100644
--- a/packet-ncp2222.inc
+++ b/packet-ncp2222.inc
@@ -11,7 +11,7 @@
* Portions Copyright (c) Gilbert Ramirez 2000-2002
* Portions Copyright (c) Novell, Inc. 2000-2003
*
- * $Id: packet-ncp2222.inc,v 1.63 2003/09/24 03:34:00 guy Exp $
+ * $Id: packet-ncp2222.inc,v 1.64 2003/09/25 11:27:24 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -4149,7 +4149,8 @@ nds_defrag(tvbuff_t *tvb, packet_info *pinfo, guint16 nw_connection, guint8 sequ
}
/* Validate that this is an NDS packet */
/* If this isn't an NDS packet then just return */
- if (request_value->ncp_rec->func!=104 || request_value->ncp_rec->subfunc!=2) {
+ if (!request_value->ncp_rec ||
+ request_value->ncp_rec->func!=104 || request_value->ncp_rec->subfunc!=2) {
dissect_ncp_reply(tvb, pinfo, nw_connection, sequence, type, tree);
return;
}
@@ -8176,14 +8177,14 @@ dissect_nds_request(tvbuff_t *tvb, packet_info *pinfo,
/* It's not part of any conversation - create a new one. */
conversation = conversation_new(&pinfo->src, &pinfo->dst,
PT_NCP, nw_connection, nw_connection, 0);
-
+ }
+
+ if (!pinfo->fd->flags.visited) {
request_value = ncp_hash_insert(conversation, sequence, ncp_rec);
request_value->req_frame_num = pinfo->fd->num;
request_value->req_frame_time.secs=pinfo->fd->abs_secs;
request_value->req_frame_time.nsecs=pinfo->fd->abs_usecs*1000;
- }
-
- if (!pinfo->fd->flags.visited) {
+
/* If this is the first time we're examining the packet,
* check to see if this NCP type uses a "request condition".
* If so, we have to build a proto_tree because request conditions