Re: Fwd: [PATCH] nf_nat_core: eliminate find_appropriate_src call if range is set IP_NAT_RANGE_PROTO_RANDOM bit on

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

 



On Mon, Jun 30, 2008 at 8:54 PM, Patrick McHardy <kaber@xxxxxxxxx> wrote:
> Changli Gao wrote:
>>
>> ---------- Forwarded message ----------
>> From: Changli Gao <xiaosuo@xxxxxxxxx>
>> Date: 2008/6/30
>> Subject: [PATCH] nf_nat_core: eliminate find_appropriate_src call if
>> range is set IP_NAT_RANGE_PROTO_RANDOM bit on
>> To: netfilter-devel@xxxxxxxxxxxxxxxxxxx
>> Cc: Changli Gao <xiaosuo@xxxxxxxxx>
>>
>>
>> Eliminate find_appropriate_src call if range is set
>> IP_NAT_RANGE_PROTO_RANDOM bit on.
>
> Please explain why the call isn't necessary.
>
In fact, my patch doesn't change the logic of the code, it just
eliminates the uesless call find_appropriate_src. Because the tuple
returned by find_appropriate is only useful when the
IP_NAT_RANGE_PROTO_RANDOM isn't set on.  instead of testing the bit
IP_NAT_RANGE_PROTO_RANDOM after calling find_appropriate_src, I do
that before it to eliminate the cost of calling find_appropriate_src.


-- 
Regards,
Changli Gao(xiaosuo@xxxxxxxxx)
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux