forked from osmocom/wireshark
Better hash function for file handles, as suggested by Brent Callaghan
(the old one was mapping file handles that differed only by one bit to the same hash value; the new one mapped them to different hash values). svn path=/trunk/; revision=22065
This commit is contained in:
parent
f445de2be5
commit
e5f3d4af31
|
@ -1840,8 +1840,7 @@ dissect_fhandle_data(tvbuff_t *tvb, int offset, packet_info *pinfo,
|
||||||
for(fhhash=0,i=0;i<(fhlen-3);i+=4){
|
for(fhhash=0,i=0;i<(fhlen-3);i+=4){
|
||||||
guint32 val;
|
guint32 val;
|
||||||
val = tvb_get_ntohl(tvb, offset+i);
|
val = tvb_get_ntohl(tvb, offset+i);
|
||||||
fhhash ^= val;
|
fhhash ^= (val >> 16) ^ val;
|
||||||
fhhash += val;
|
|
||||||
}
|
}
|
||||||
if(hidden){
|
if(hidden){
|
||||||
fh_item=proto_tree_add_uint_hidden(tree, hf_nfs_fh_hash, tvb, offset,
|
fh_item=proto_tree_add_uint_hidden(tree, hf_nfs_fh_hash, tvb, offset,
|
||||||
|
|
Loading…
Reference in New Issue