Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1071833ybi; Wed, 19 Jun 2019 12:59:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqya9Q+pYVYCEny2vfsXLpeqAOal2eD2DDiBMzaSzN1AhvIfa69rW8nQ04xfKsl9CpZNlnel X-Received: by 2002:a17:90a:8c90:: with SMTP id b16mr12868011pjo.133.1560974355161; Wed, 19 Jun 2019 12:59:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560974355; cv=none; d=google.com; s=arc-20160816; b=jNmAdyU5TjZyvUg5EoMMkhi3YaZogGQ9mzZPPC09hzrInyLwORRuwEvfC1TUIkVmFo EPuM4eH5z47G1cDe56vlgzurphSfVhFv5kSSx7DXPHgPpue0l0I+WSMq3PUkSFWAn/3K lr/qmkRmQP7/wNhViuInjWWqLtcwvFi6yKvaFq+geaZqQMxPW+xgRYuNVSawyvppOo6K zhZsPq4WNIvhvoM4FRifS2YZHladZN9Ih3fnp5Qi7XCDaC5vHcPw1Glr74Opb57zInmj S4zbs104G4IQVn+Uno8GLCxKDHimptfcYLz9g4kphqCk2srkeLbT+JGIwP8+0fkW67db Kv7w== 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 :in-reply-to:references:mime-version; bh=6AYyD7TdXFlYd8xNntFANT3/Llq0uH8/SY9AGv/U5DI=; b=sMS/3JWiZ7QG1CiHdoIEovWg7SktVI0jCm2OTCOyB1bXHojWPNqBC6ckrd6WxJEhCG ExtoonTlHNWw3rJA1E0W4CgrN6LxhwmxLixfl29vq0odMyfMqiUEzEZyKboeuT9vPbaN BN5y8KHnRuCKT57u5SN1bYpz1dG50Ia0wyvq8K+ETDPedZ8ydYGJCR40p7AT2DYw/Xb+ i6UmmX/3SXA2t1ydydq1PRI5Gfdns0J0PwxsL3g2vPNZeOygbaiDYjfr8UelHcvAgLHa KxNyHh0+RjvuHZwWwawAKXeIaeFkeSkzxFjKZhR7iMsjx0nTRTx+Va9QzpH0Ttf1wrGo 7tZg== 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 o63si2136122pjo.94.2019.06.19.12.58.59; Wed, 19 Jun 2019 12:59:15 -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 S1730329AbfFST5z (ORCPT + 99 others); Wed, 19 Jun 2019 15:57:55 -0400 Received: from mail-qt1-f193.google.com ([209.85.160.193]:37101 "EHLO mail-qt1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726143AbfFST5z (ORCPT ); Wed, 19 Jun 2019 15:57:55 -0400 Received: by mail-qt1-f193.google.com with SMTP id y57so543048qtk.4; Wed, 19 Jun 2019 12:57:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=6AYyD7TdXFlYd8xNntFANT3/Llq0uH8/SY9AGv/U5DI=; b=YFqWX8E9WKgmfO4L47m4uY2XbYw/sglIBwe/8lNylUdMZhH7BhgKLrKzM4oHvxTJtC kdB1M/GQe12gJyqfjF88y2dYRO1ylaoXBDZVxQeumJHaFOKCBj/WenZ9NmQPZbARgwWW 3//tTs62VaMCEbmCFAVfQ+4AKW/dFQIoiWnhY/vADTMUWtUnlo9KZFVdWEdqN2J0qxj1 OO4oJt3I2aJ8j6WVc6ew6g9dyuNhNqeZRGd5v1Y5fhVfQxtnJVYA+W6BeNTWUtsalOVt 9AGG5OWlPh0BvnVpSdPITdSESJ1AHqOnlkKRkw+wOB1hTDZT82ubKHgfBOUmxlSsPwJC ag/A== X-Gm-Message-State: APjAAAWDOvyDlKqe/2k+nMd7uxuAaFOEnvIYrX4v2mtWDO0TzRUwZlNZ f+fk8zh5RvW45zsshPFT6VEHGhHHX21TUem9DMA= X-Received: by 2002:a0c:87bd:: with SMTP id 58mr35151296qvj.62.1560974273851; Wed, 19 Jun 2019 12:57:53 -0700 (PDT) MIME-Version: 1.0 References: <20190619125500.1054426-1-arnd@arndb.de> <20190619174642.hvjvmfaptfdkmbpk@salvia> In-Reply-To: <20190619174642.hvjvmfaptfdkmbpk@salvia> From: Arnd Bergmann Date: Wed, 19 Jun 2019 21:57:35 +0200 Message-ID: Subject: Re: [PATCH] netfilter: synproxy: fix building syncookie calls To: Pablo Neira Ayuso Cc: Jozsef Kadlecsik , Florian Westphal , "David S. Miller" , Alexey Kuznetsov , Hideaki YOSHIFUJI , Fernando Fernandez Mancera , wenxu , netfilter-devel , coreteam@netfilter.org, Linux Kernel Mailing List , Networking 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 Wed, Jun 19, 2019 at 7:46 PM Pablo Neira Ayuso wrote: > > On Wed, Jun 19, 2019 at 02:54:36PM +0200, Arnd Bergmann wrote: > > When either CONFIG_IPV6 or CONFIG_SYN_COOKIES are disabled, the kernel > > fails to build: > > > > include/linux/netfilter_ipv6.h:180:9: error: implicit declaration of function '__cookie_v6_init_sequence' > > [-Werror,-Wimplicit-function-declaration] > > return __cookie_v6_init_sequence(iph, th, mssp); > > include/linux/netfilter_ipv6.h:194:9: error: implicit declaration of function '__cookie_v6_check' > > [-Werror,-Wimplicit-function-declaration] > > return __cookie_v6_check(iph, th, cookie); > > net/ipv6/netfilter.c:237:26: error: use of undeclared identifier '__cookie_v6_init_sequence'; did you mean 'cookie_init_sequence'? > > net/ipv6/netfilter.c:238:21: error: use of undeclared identifier '__cookie_v6_check'; did you mean '__cookie_v4_check'? > > > > Fix the IS_ENABLED() checks to match the function declaration > > and definitions for these. > > I made this: > > https://patchwork.ozlabs.org/patch/1117735/ > > Basically it does: > > +#endif > +#if IS_MODULE(CONFIG_IPV6) && defined(CONFIG_SYN_COOKIES) > .cookie_init_sequence = __cookie_v6_init_sequence, > .cookie_v6_check = __cookie_v6_check, > #endif > > If CONFIG_IPV6=n, then net/ipv6/netfilter.c is never compiled. > > Unless I'm missing anything, I'd prefer my patch because it's a bit > less of ifdefs 8-) That takes care of the link error, but not the "implicit declaration" when netfilter_ipv6.h is included without SYN_COOKIES. My patch addresses both issues together since they are strongly related. Arnd