From mboxrd@z Thu Jan 1 00:00:00 1970 From: Patrick McHardy Subject: Re: [NETFILTER 08/08]: nf_conntrack: UDPLITE support Date: Sun, 15 Jul 2007 01:05:19 +0200 Message-ID: <469956AF.7060807@trash.net> References: <20070714151150.9829.47674.sendpatchset@localhost.localdomain> <20070714151200.9829.67499.sendpatchset@localhost.localdomain> <200707141654.l6EGs6XG008905@toshiba.co.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Cc: netfilter-devel@lists.netfilter.org, davem@davemloft.net To: Yasuyuki KOZAKAI Return-path: In-Reply-To: <200707141654.l6EGs6XG008905@toshiba.co.jp> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: netfilter-devel-bounces@lists.netfilter.org Errors-To: netfilter-devel-bounces@lists.netfilter.org List-Id: netfilter-devel.vger.kernel.org Yasuyuki KOZAKAI wrote: > From: Patrick McHardy > Date: Sat, 14 Jul 2007 17:12:44 +0200 (MEST) > > >>[NETFILTER]: nf_conntrack: UDPLITE support > > > Maybe you predict this question :) Why do you think that new module is > needed instead of reusing codes in nf_conntrack_proto_udp.c ? I did :) Reusing code for the conntrack helper didn't seem to buy much, the only two functions that actually do anything besides copying header values are too different to merge (checksumming/ packet handling). It also needs seperate sysctls, which is responsible for another 20%-30% of the code. So it comes down to saving two or three completely trivial functions, which is IMO not even worth exporting them. For the NAT helpers it makes a lot more sense. The port selection logic, the in_range check, the manip_pkt function for UDP/TCP and the nf_conntrack_netlink functions could all be generalized and moved to a common helper helper :) This is the main reason why I didn't include a NAT helper yet, I have some unfinished work to do all that.