aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-gssapi.c
diff options
context:
space:
mode:
authorRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>2006-12-14 10:11:40 +0000
committerRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>2006-12-14 10:11:40 +0000
commit2aaabbba43db00b371e651a1789ba080602923a7 (patch)
treed4547da000979d53a3022e2890c7d20cde4d560b /epan/dissectors/packet-gssapi.c
parent577343f7c3787839b8ec9fc1f55ac1e5a7813dfb (diff)
check for whether the blob starts with "NTLMSSP" before any other check if it is not BED/DER encoded and call tha appropriate subdissector if so.
this fixes some issues with some really ancient cifs implementations where the previous tests and statemanagement would cause it to fail othervise. svn path=/trunk/; revision=20136
Diffstat (limited to 'epan/dissectors/packet-gssapi.c')
-rw-r--r--epan/dissectors/packet-gssapi.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/epan/dissectors/packet-gssapi.c b/epan/dissectors/packet-gssapi.c
index 85d6ee14a5..127fa8a7f4 100644
--- a/epan/dissectors/packet-gssapi.c
+++ b/epan/dissectors/packet-gssapi.c
@@ -222,7 +222,6 @@ dissect_gssapi_work(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
conversation_add_proto_data(conversation, proto_gssapi, gss_info);
}
-
item = proto_tree_add_item(
tree, proto_gssapi, tvb, offset, -1, FALSE);
@@ -304,6 +303,14 @@ dissect_gssapi_work(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
if (!(class == BER_CLASS_APP && pc && tag == 0)) {
+ /* It could be NTLMSSP, with no OID. This can happen
+ for anything that microsoft calls 'Negotiate' or GSS-SPNEGO */
+ if ((tvb_length_remaining(gss_tvb, start_offset)>7) && (tvb_strneql(gss_tvb, start_offset, "NTLMSSP", 7) == 0)) {
+ call_dissector(ntlmssp_handle, tvb_new_subset(gss_tvb, start_offset, -1, -1), pinfo, subtree);
+ return_offset = tvb_length(gss_tvb);
+ goto done;
+ }
+
/*
* If we do not recognise an Application class,
* then we are probably dealing with an inner context
@@ -334,18 +341,11 @@ dissect_gssapi_work(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
}
if (!oidvalue)
{
- /* It could be NTLMSSP, with no OID. This can happen
- for anything that microsoft calls 'Negotiate' or GSS-SPNEGO */
- if (tvb_strneql(gss_tvb, start_offset, "NTLMSSP", 7) == 0) {
- call_dissector(ntlmssp_handle, tvb_new_subset(gss_tvb, start_offset, -1, -1), pinfo, subtree);
- } else {
- proto_tree_add_text(subtree, gss_tvb, start_offset, 0,
+ proto_tree_add_text(subtree, gss_tvb, start_offset, 0,
"Unknown header (class=%d, pc=%d, tag=%d)",
class, pc, tag);
- }
return_offset = tvb_length(gss_tvb);
goto done;
-
} else {
tvbuff_t *oid_tvb;