https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6221
--- Comment #14 from Simon Arlott <[email protected]> 2010-01-27 13:12:00 UTC --- (In reply to comment #13) > As we discuss this, I'm remembering more from when I worked on bug 4620. > SpamAssassin selects a port number at random and then increments from there. > That is to keep two processes from working in the same range of ports. That doesn't make sense... it should keep whichever port it finds until it's done with all its queries. There's then much less chance of reusing a port from another process. Each process can guarantee uniqueness by not reusing IDs. As far as I could tell the last time I checked, it kept the same port throughout the process lifetime. > If, as you say for Linux, the counter that iterates through port numbers is > system wide and not per process, then this would not be necessary and I think > your patch would work and would be better. > > I don't think that we can count on that behavior. I certainly didn't see it in > the tests I ran for bug 4260. When I did that I was testing under Cygwin on > Windows and Fedora Core 3. It would be good to have a simple test that shows > how the port selection goes with repeated UDP port 0 socket creation across > different processes, and test that on different platforms. It looks like a recent Linux kernel now picks ports at random. Older kernels definitely iterated through them. The OS is also best placed to avoid reusing ports too soon. > Your idea of making it a configuration option may be the way to go if it is > possible to easily test what a particular system's behavior is, even if it is > a > test that a sysadmin has to run manually to help decide how to set the > configuration option. -- Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug.
