Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src


                                port = ntohs(np->in_pmin) + ipf_random() %
                                  (ntohs(np->in_pmax) - ntohs(np->in_pmin));

Ah, you are correct.  I should have looked closer.

Of much greater concern is that I'm not seeing a test for collision.  I
haven't done an indepth analysis of the code, but given that we're
looking at a space of <= 16 bits, a collision is a very real
possibility on a busy server so it is something that definitely needs
to be handled.

Well, it *is* tested for collision.  This whole block is in a loop that
checks whether the result of this is already in use.  So with your
change above, it should work as expected.


Home | Main Index | Thread Index | Old Index