OpenSolaris

Printable Version Enter a New Search
Bug ID 6338289
Synopsis poor sadb hash distribution for IPv6 addresses
State 10-Fix Delivered (Fix available in build)
Category:Subcategory network:ipsec
Keywords
Responsible Engineer William Sommerfeld
Reported Against s10
Duplicate Of
Introduced In solaris_9
Commit to Fix snv_27
Fixed In snv_27
Release Fixed solaris_nevada(snv_27) , solaris_10u3(s10u3_02) (Bug ID:2137059)
Related Bugs 4274579 , 4521202
Submit Date 18-October-2005
Last Update Date 9-November-2005
Description
because of poor paren placement, the OUTBOUND_HASH_V6 macro in sadb.h computes a hash value of:

        *x^(*x+1)^(*x+2)^(*x+3)

when
        x[0]^x[1]^x[2]^x[3]

was intended, with the result that only a small number of outbound hash buckets are ever used.  it appears that roughly half end up in bucket 0, with the rest at assorted other buckets in a decaying exponential distribution.  i haven't worked out the math of the precise distribution just yet other than to know, intuitively, that it's really amazingly poor...

see
http://cvs.opensolaris.org/source/xref/usr/src/uts/common/inet/sadb.h#298
for code.
Work Around
N/A
Comments
N/A