< Previous by Date Date Index Next by Date >
  Thread Index Next in Thread >

[reSIProcate] [PATCH] Add more and better salt values to callid computation


The following patch address several issues. The first is a multi-thread, multi-cpu race condition with the current callid. If you have several separate instances of dum, the same call-id can be computed on a multicore/processor machine. To solve this, the patch adds process and thread-id to the salt value.

 

The process / thread id is currently implemented on Win32, Apple, and Linux. On linux, getpid() returns a different value for each thread. The other platforms use the respective calls for getting the process id and thread id. I did not implement other platforms since I don’t have access to them.

 

To address other concerns that the call-id does not contain enough randomness the patch increases the number of hex digits chosen to 16. This should massively reduce the collision space of call-ids as people have reported on the mailing list previously.

 

 

Aron Rosenberg

SightSpeed Inc.

http://www.sightspeed.com

 

Attachment: resiprocate_thread_random_callid.diff
Description: resiprocate_thread_random_callid.diff