From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pablo Neira Ayuso Subject: Re: [PATCH] netfilter: move ipv6_find_hdr to net/ipv6/netfilter.c and rename it Date: Tue, 27 Nov 2012 01:59:28 +0100 Message-ID: <20121127005928.GA20540@1984> References: <1353798438-6331-1-git-send-email-pablo@netfilter.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: netfilter-devel@vger.kernel.org To: Jan Engelhardt Return-path: Received: from mail.us.es ([193.147.175.20]:46858 "EHLO mail.us.es" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757174Ab2K0A7g (ORCPT ); Mon, 26 Nov 2012 19:59:36 -0500 Content-Disposition: inline In-Reply-To: Sender: netfilter-devel-owner@vger.kernel.org List-ID: On Sun, Nov 25, 2012 at 12:34:20PM +0100, Jan Engelhardt wrote: > On Sunday 2012-11-25 00:07, pablo@netfilter.org wrote: > > >From: Pablo Neira Ayuso > > > >IPVS uses ipv6_find_hdr, but this function is defined in ip6_tables.c, > >to avoid such a dependency, move the function definition to the > >generic IPv6 netfilter infrastructure. > > Could we move this in a different way, such that the "ipv6_find_hdr" > function and functions from exthdrs_core.c end up in a separate > module (or even built-in code), such that modules like xt_socket.c > can drop their dependency on ipv6.ko? I'd go the other way around: we split xt_socket into two chunks so we can avoid such IPv6 dependency. > >index 429089c..d25f2d9 100644 > >--- a/net/ipv6/netfilter.c > >+++ b/net/ipv6/netfilter.c > >@@ -60,6 +60,109 @@ int ip6_route_me_harder(struct sk_buff *skb) > > EXPORT_SYMBOL(ip6_route_me_harder); > > > >+int nf_ip6_find_hdr(const struct sk_buff *skb, unsigned int *offset, > >+ int target, unsigned short *fragoff, int *flags) > >+{ > >[...] > >+} > >+EXPORT_SYMBOL(nf_ip6_find_hdr);