From Yaniv Kaul: dissect authentication data as NTLMSSP only if it
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Fri, 29 Oct 2004 08:01:11 +0000 (08:01 +0000)
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Fri, 29 Oct 2004 08:01:11 +0000 (08:01 +0000)
starts with "NTLMSSP", otherwise dissect it as GSS-API.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@12430 f5534014-38df-0310-8fa8-9805f1628bb7

epan/dissectors/packet-http.c

index 18a044ac9b2f03319332bf4a4bab3971acf6811f..a8359645a54dff384e99c5b4a20b447ac203a3a2 100644 (file)
@@ -165,6 +165,7 @@ static dissector_table_t media_type_subdissector_table;
 static heur_dissector_list_t heur_subdissector_list;
 
 static dissector_handle_t ntlmssp_handle=NULL;
+static dissector_handle_t gssapi_handle=NULL;
 
 
 /* Return a tvb that contains the binary representation of a base64
@@ -193,9 +194,11 @@ dissect_http_ntlmssp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
 
        ntlmssp_tvb = base64_to_tvb(line);
        tvb_set_child_real_data_tvbuff(tvb, ntlmssp_tvb);
-       add_new_data_source(pinfo, ntlmssp_tvb, "NTLMSSP Data");
-
-       call_dissector(ntlmssp_handle, ntlmssp_tvb, pinfo, tree);
+       add_new_data_source(pinfo, ntlmssp_tvb, "NTLMSSP / GSSAPI Data");
+       if (tvb_strneql(ntlmssp_tvb, 0, "NTLMSSP", 7) == 0)
+               call_dissector(ntlmssp_handle, ntlmssp_tvb, pinfo, tree);
+       else
+               call_dissector(gssapi_handle, ntlmssp_tvb, pinfo, tree);
 }
 
 static void
@@ -1731,6 +1734,7 @@ proto_reg_handoff_http(void)
        dissector_add("udp.port", UDP_PORT_SSDP, http_udp_handle);
 
        ntlmssp_handle = find_dissector("ntlmssp");
+       gssapi_handle = find_dissector("gssapi");
 }
 
 /*