On 01/30/09 08:18, Kacheong Poon wrote:
> Michael Schuster wrote:
>
>> I guess it would, but that's not what I expected after that email
>> exchange I mentioned.
>> Conversely, is "port == 0 means 'all ports'" hard to implement?
>
>
> It is just code after all. So the sanity check becomes
> more involved...
>
> if ((min_port == 0 && max_port != 0) ||
> (min_port != 0 && max_port == 0) ||
> (min_port > max_port) {
> return (EINVAL);
> }
> if (min_port == 0) {
> min_port = 1;
> max_port = 65535;
> }
>
> If you think that the above is easier to read than the
> current simple check, feel free to change the code.
I can't find it right now, but I get the impression that I read somewhere
that "port == 0 means port collapsing". If that's correct, I think the
above change should only be applied to *rules* (as opposed to servers)
after some more deliberation, ie comment from you, Kacheong ;-) - would you
be so kind?
thx
Michael
--
Michael Schuster http://blogs.sun.com/recursion
Recursion, n.: see 'Recursion'