Received: by 2002:ac0:a591:0:0:0:0:0 with SMTP id m17-v6csp1864177imm; Fri, 6 Jul 2018 07:51:47 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfP/nxLGv04u0TwvN6s8y2uF/+TiECYGwpPK2hmd82ra3OKmyDs11X9saCzJ09lCym0+co+ X-Received: by 2002:a65:5cc5:: with SMTP id b5-v6mr9558592pgt.425.1530888707725; Fri, 06 Jul 2018 07:51:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530888707; cv=none; d=google.com; s=arc-20160816; b=xU+xiCVNUgUIEEXrg4DDp+RyK1j04ANTpjJ6JKqloJrLJuJ+a1g7Wdd+5mNXHgaQ+k zudFWCClOhL4EV53+jyWJUawjedEnLGsmmkyJS/gfkLtnIYNWeBQnnr7Z6cXnlLX66sa r9UY52hMXN0llU5FQ0Bv1rCJUor57RwtszopdRtDJTsFaPS8DPvqU7iwzsAOf2Y6xOjT mw3c6ojI5fCIXRp4ybgFAn5SNZncOpzCsyCkirumXlT4UIAcNYvWRCHFyW9zSRc+W6Px a394iw5maUbiHWL10FaBhnbzmoEsZKpyExeZEam9cCQEgCH7M0QoWc2rJdor3tlu7Ez9 d5Dw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=kfQd/b3q1o3JpFPE8GDUf2uY7Kctpe09+7xRxhi8iDU=; b=LOKZ88hqsWc46f8dwYHP1tPt7yTS03d7kienH+6ttogiBpwKfVSYfGSpDKviLxUEs3 yXiRkqKYGdbZ6BJZWVOdWKquC0jU8aZOFQcbMxT8P8DZwbOru61+l4FURSKwqQCWW6lX G9rAUu7DqOdGYu/MhRAmu88/vs1tln18UwE0G3ehKc8MKOvuya13tvQ60j23TdTLaCyl Yqi6Hys1jFnSBcwHcW7cn9jc803NQad0/JdcqU8LMJ5BKpU6AbTej2K6sZjyAAX+y0UR vv0v0+WVZWi/AUSdRsep9R2vnkMjlidlw+YR8S8feQDy0M3TWcbS0izjKJY+1ib8QEoL A/BQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=sQYjMRwF; 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 h4-v6si7704466pgs.201.2018.07.06.07.51.32; Fri, 06 Jul 2018 07:51:47 -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; dkim=fail header.i=@gmail.com header.s=20161025 header.b=sQYjMRwF; 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 S933125AbeGFOuu (ORCPT + 99 others); Fri, 6 Jul 2018 10:50:50 -0400 Received: from mail-lj1-f194.google.com ([209.85.208.194]:39519 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932516AbeGFOus (ORCPT ); Fri, 6 Jul 2018 10:50:48 -0400 Received: by mail-lj1-f194.google.com with SMTP id t7-v6so9353152ljj.6; Fri, 06 Jul 2018 07:50:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=kfQd/b3q1o3JpFPE8GDUf2uY7Kctpe09+7xRxhi8iDU=; b=sQYjMRwFh0KrjmrsOO1N3vK0GtVxqfE7b//y2N+lqZ+6iXfnvIWB5Iw/JOpiXLhGA9 fit8Or/LdMbiZiIgnm8wrhyGgCJG7SQArUrfHHZJEwvQvznkP8Nb/VjCSp4FT3Lgz3hj ZC+rdr+HM9IEfzmZViLfiGc3QZT53NDUPwe8J2mpXp7k6zQjd2ysp24NZUKHz0iHEVVg ICy1wAE/g2j/QvdLxiUizU++Jx+wKkBJmxu93LsNwqaeanewsSbR/PUrTQ3nokIpGFB7 1kv+FklHgj0HhRZw5uFWwylsnBvvF8muOxDvWHOVZrcZsyF40mgwfb6SAAX3LNDeHkHE bDvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=kfQd/b3q1o3JpFPE8GDUf2uY7Kctpe09+7xRxhi8iDU=; b=CtBgPzPy5bjg7QBQb/gTgYdIfYzdY4PiHAlND/BOE5qYAZ5waaxs5UZUZUvDSFipaV IMlQnCioTXpYJATB6z0p2+3A9rZ3XE9nMPCurqNOn/I8h0Y+IQCJi4B270R+Y5lQtWYq WeqBkn+WliWWA+tz/Dnq7OcNM2/tHqWIckxij8vGQXtM8X8Fiz9EBXtoOsxLtbYiJBhA oF56PrezZp4aXTpnci8YKu1T0vTd6iiIaEoX70bKKLCMDLjxv5HWRCk6YbMxGeBKyp6M nNgjIp0OvsOycpMVKHZ9mTlSp3W27tNSDQhrfjKO91Mw7w3rQvXnI/8Ua1mIvuLryfF1 oZHQ== X-Gm-Message-State: APt69E1oXuU2KlK0/vLhreOpjqS0VBI2GWlsNgh0Rh6jDQaE1b33++Fz Cm5IawtjgCzNN3rxTy2rzPoZofQWZzyCyQzi/x1XNYXd X-Received: by 2002:a2e:118f:: with SMTP id 15-v6mr6815327ljr.38.1530888646162; Fri, 06 Jul 2018 07:50:46 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a2e:41c1:0:0:0:0:0 with HTTP; Fri, 6 Jul 2018 07:50:45 -0700 (PDT) In-Reply-To: <20180706135516.viz6pjtkdmcoqq2l@breakpoint.cc> References: <20180706130005.3640993-1-arnd@arndb.de> <20180706135516.viz6pjtkdmcoqq2l@breakpoint.cc> From: Arnd Bergmann Date: Fri, 6 Jul 2018 16:50:45 +0200 X-Google-Sender-Auth: 76LTAzmV-tfWNCygcOBE5U5p3SU Message-ID: Subject: Re: [PATCH] netfilter: conntrack: add weak IPV6 dependency To: Florian Westphal Cc: Pablo Neira Ayuso , Jozsef Kadlecsik , "David S. Miller" , =?UTF-8?B?TcOhdMOpIEVja2w=?= , Fernando Fernandez Mancera , "Pablo M. Bermudo Garay" , Felix Fietkau , netfilter-devel@vger.kernel.org, coreteam@netfilter.org, Networking , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 6, 2018 at 3:55 PM, Florian Westphal wrote: > Arnd Bergmann wrote: >> Now that the conntrack module contains code for ipv6, we can no longer >> have it built-in while IPv6 itself is a loadable module: >> >> net/netfilter/nf_conntrack_proto.o: In function `nf_ct_netns_do_get': >> nf_conntrack_proto.c:(.text+0x88c): undefined reference to `nf_defrag_ipv6_enable' > > AFAICS this is caused by > > CONFIG_NF_CONNTRACK=y > CONFIG_IPV6=m > CONFIG_NF_DEFRAG_IPV6=m > > This is exported via nf_defrag_ipv6.ko. > > nf_defrag_ipv6 has an ipv6 dependency, but i think it might be avoidable > so this would work: > > CONFIG_NF_CONNTRACK=y > CONFIG_NF_DEFRAG_IPV6=y > CONFIG_IPV6=m I've tried it like this now: diff --git a/net/ipv6/netfilter/Kconfig b/net/ipv6/netfilter/Kconfig index 07516d5c2f80..18b9f8f37c97 100644 --- a/net/ipv6/netfilter/Kconfig +++ b/net/ipv6/netfilter/Kconfig @@ -5,10 +5,6 @@ menu "IPv6: Netfilter Configuration" depends on INET && IPV6 && NETFILTER -config NF_DEFRAG_IPV6 - tristate - default n - config NF_SOCKET_IPV6 tristate "IPv6 socket lookup support" help @@ -352,3 +348,6 @@ endif # IP6_NF_IPTABLES endmenu +config NF_DEFRAG_IPV6 + tristate + default n diff --git a/net/netfilter/Kconfig b/net/netfilter/Kconfig index e42c38c99741..51be519a3802 100644 --- a/net/netfilter/Kconfig +++ b/net/netfilter/Kconfig @@ -49,9 +49,8 @@ config NETFILTER_NETLINK_LOG config NF_CONNTRACK tristate "Netfilter connection tracking support" default m if NETFILTER_ADVANCED=n - depends on IPV6 || !IPV6 select NF_DEFRAG_IPV4 - select NF_DEFRAG_IPV6 if IPV6 + select NF_DEFRAG_IPV6 if IPV6 != n help Connection tracking keeps a record of what packets have passed through your machine, in order to figure out how they are related 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. Arnd