Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp930137imm; Mon, 9 Jul 2018 13:28:37 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeXn9nXasKTBZgBc82pheHFDnk6SuZx6bkM4Wlg8AhyPkXVbww5G258WKtECxXjq/F6DzH6 X-Received: by 2002:a17:902:4324:: with SMTP id i33-v6mr1898925pld.43.1531168117893; Mon, 09 Jul 2018 13:28:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531168117; cv=none; d=google.com; s=arc-20160816; b=a+UjA8E0o+tDGPEHuCQSN/7BcWtsJmr9VVjbJciVhtHBfrWBFOAjbyVrdT/eNbaKcv Y7ldmY0+qAPOrX5JBxILS9/OuSEwNNNpyfewEbec7DFFYdCco4KrRXvio/5/eSmEk4BW qWw6lM2DM+L+UFAjSSpywCFi7fcuGTHcnmVM9P30zAxSFeVu/lcQeUBd3WFr6Bz1qF7+ M2gLpfT4BEjdN3TFqp/rnllo8kcYObPDh7KfPmlXZ3LFaZql/N57LICSCaa2rML0IbJR q2XB3+JbK6fxzjx9fuEhuWhRZw0W9NkhVOoVUNqTW3mFiIvoZGLUnX+IZ768Ty3xFuyA rY5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=qNbEMKcejQSijbpjzO8g8epz8UT2qbBNfWfI1b1zckc=; b=J/RB8MqHkXGN+p5sJ0ElJe9Ckrhj5ionoAOpWgoTyOfPY13iLBemnTNQ1vkCPr2nVh Iw0EiDh9Ze9BtySR9EtX9SorCLxfDCOjlwBPcVVonZaK5N+YqK4fqE/+7olvTF/7X0I9 dVD0lUeETQGU97d37L3OVULWM+I+Te8zR3v4Rd5wbyfpDysaz2aMMi/yPt/b8/dF7V7o W2cm3f/27nbPeg1qSmKpw6p0u2+DZuleq/NYa9JSt5M3iPvjq727Fs3PcXIJbQTR9MSu +3IaEtNnID8vVlQXWFs3lzdoSMnE3pFXu6OEPERBUNJ565sD/5UIcNWQbPWbpju1s9YX tfRw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f62-v6si5451176pfa.73.2018.07.09.13.28.22; Mon, 09 Jul 2018 13:28:37 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933078AbeGIU1k (ORCPT + 99 others); Mon, 9 Jul 2018 16:27:40 -0400 Received: from Chamillionaire.breakpoint.cc ([146.0.238.67]:35358 "EHLO Chamillionaire.breakpoint.cc" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932686AbeGIU1i (ORCPT ); Mon, 9 Jul 2018 16:27:38 -0400 Received: from fw by Chamillionaire.breakpoint.cc with local (Exim 4.89) (envelope-from ) id 1fcckn-0003cA-OF; Mon, 09 Jul 2018 22:27:25 +0200 Date: Mon, 9 Jul 2018 22:27:25 +0200 From: Florian Westphal To: Pablo Neira Ayuso Cc: Florian Westphal , Arnd Bergmann , Jozsef Kadlecsik , "David S. Miller" , =?iso-8859-15?Q?M=E1t=E9?= Eckl , Fernando Fernandez Mancera , "Pablo M. Bermudo Garay" , Felix Fietkau , netfilter-devel@vger.kernel.org, coreteam@netfilter.org, Networking , Linux Kernel Mailing List Subject: Re: [PATCH] netfilter: conntrack: add weak IPV6 dependency Message-ID: <20180709202725.d2fgn5p26whfrvfn@breakpoint.cc> References: <20180706130005.3640993-1-arnd@arndb.de> <20180706135516.viz6pjtkdmcoqq2l@breakpoint.cc> <20180706150037.knqt736uq6uyh3bs@breakpoint.cc> <20180706183548.hk7jwobomkqdccs5@breakpoint.cc> <20180709165050.uuglk24ctiezhnye@salvia> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180709165050.uuglk24ctiezhnye@salvia> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Pablo Neira Ayuso wrote: > On Fri, Jul 06, 2018 at 08:35:48PM +0200, Florian Westphal wrote: > > Florian Westphal wrote: > > > Arnd Bergmann wrote: > > > > and that resulted in a new build failure: > > > > > > > > net/netfilter/nf_conntrack_proto.o:(.rodata+0x788): undefined > > > > reference to `nf_conntrack_l4proto_icmpv6' > > > > net/ipv6/netfilter/nf_conntrack_reasm.o: In function `nf_ct_frag6_expire': > > > > nf_conntrack_reasm.c:(.text+0x2320): undefined reference to > > > > `ip6_expire_frag_queue' > > > > net/ipv6/netfilter/nf_conntrack_reasm.o: In function `nf_ct_frag6_init': > > > > nf_conntrack_reasm.c:(.text+0x2384): undefined reference to `ip6_frag_init' > > > > nf_conntrack_reasm.c:(.text+0x2394): undefined reference to `ip6_frag_init' > > > > nf_conntrack_reasm.c:(.text+0x2398): undefined reference to `ip6_rhash_params' > > > > net/ipv6/netfilter/nf_conntrack_reasm.o: In function `nf_ct_frag6_expire': > > > > nf_conntrack_reasm.c:(.text+0x10bc): undefined reference to > > > > `ip6_expire_frag_queue' > > > > > > > > I don't think we can get CONFIG_NF_DEFRAG_IPV6=y to work with IPV6=m. > > > > > > Yes, not with current implementation, but I still don't think this > > > is unavoidable. > > > > > > In case this is urgent I'm fine with the patch that adds the dependency, > > > otherwise I'd like to try and disentangle nf_conntrack_reasm and ipv6. > > > > This links fine for me with IPV6=m: > > > > Pablo, do you think this is too ugly? > > Well, yes... > > > It requires some copypastry from ipv6 defrag into nfct ipv6 defrag > > to avoid the link errors outlined above. > > This is a bit of a regression I think. nf_defrag_ipv6 has always depended on ipv6. Previously dependency chain is nf_conntrack_ipv6 -> ipv6 +-----> nf_defrag_ipv6 > ipv6 +-----> nf_conntrack new dependency chain is: nf_conntrack --> nf_defrag_ipv6 --> ipv6 The alternate fix is the one from Arnd to disallow NF_CONNTRACK=y IPV6=m > While I think a bit of demodularization is fine, if things like this > start to kick in, it's probably good if we go make a step back... If you want to revert, ok. It will prevent all l4 unification patches plus any attempt to get rid of the nf_hook for defrag too however so I do not like it. > Let me know, thanks. Yet another alternative would be to remove the nf_conntrack -> nf_defrag_ipv6 dependency, e.g. by adding a new rcu-protected function pointer. nf_conntrack, when ipv6 conntrack is requested, would check if its null, and, if so, issue request_module() for ipv6 defrag before failing the request. However, I find it even more ugly than my patch.