From cac179078295da65b0ae14fe1200433a4dfafbf2 Mon Sep 17 00:00:00 2001 From: Ronnie Sahlberg Date: Thu, 13 May 2004 13:39:47 +0000 Subject: [PATCH] isns standard is unclear here but some servers do respond with a 0 length PGT in DevAttrRegRsp if the DevAttrReg contained it. Allow DevAttrRegRsp to contain 0 length PGTs. svn path=/trunk/; revision=10868 --- packet-isns.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/packet-isns.c b/packet-isns.c index c5147cad5c..ac19b8b74b 100644 --- a/packet-isns.c +++ b/packet-isns.c @@ -7,7 +7,7 @@ * Copyright 2003, Elipsan, Gareth Bushell * (c) 2004 Ronnie Sahlberg updates * - * $Id: packet-isns.c,v 1.5 2004/05/13 13:28:38 sahlberg Exp $ + * $Id: packet-isns.c,v 1.6 2004/05/13 13:39:47 sahlberg Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs @@ -824,14 +824,17 @@ dissect_isns_attr_integer(tvbuff_t *tvb, guint offset, proto_tree *parent_tree, * in a DevAttrReg , the PGT (tag 51) may be sent as 0 length * which then means that we wish to register the portal group tag * as NULL. - * + * (At least) some servers will respond with PGT as a 0 length + * value in these instances in the DevAttrRegRsp (eventhough I can + * not find this mentioned in the standard) so allow it for the + * response as well. */ if(len){ if(parent_tree){ item=proto_tree_add_item(parent_tree, hf_index, tvb, offset + 8, len, FALSE); tree = proto_item_add_subtree(item, ett_isns_attribute); } - } else if((tag==ISNS_ATTR_TAG_PORTAL_GROUP_TAG)&&(function_id==ISNS_FUNC_DEVATTRREG)){ + } else if((tag==ISNS_ATTR_TAG_PORTAL_GROUP_TAG)&&((function_id==ISNS_FUNC_DEVATTRREG)||(function_id==ISNS_FUNC_RSP_DEVATTRREG))){ /* 5.6.5.1 */ if(parent_tree){ item=proto_tree_add_uint_format(parent_tree, hf_isns_portal_group_tag, tvb, offset, 8, 0, "PG Tag: ");