From patchwork Sat Mar 12 12:18:04 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shivani Bhardwaj X-Patchwork-Id: 596647 X-Patchwork-Delegate: pablo@netfilter.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3qMjjH4SdRz9sXQ for ; Sat, 12 Mar 2016 23:18:43 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=DArhCmM1; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751523AbcCLMSm (ORCPT ); Sat, 12 Mar 2016 07:18:42 -0500 Received: from mail-pf0-f195.google.com ([209.85.192.195]:34040 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750998AbcCLMSm (ORCPT ); Sat, 12 Mar 2016 07:18:42 -0500 Received: by mail-pf0-f195.google.com with SMTP id n5so3885302pfn.1 for ; Sat, 12 Mar 2016 04:18:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:subject:message-id:mime-version:content-disposition :user-agent; bh=siXs0+Q6llYMAVpY9wwnTMaRUuplRAqDYwNHRyydHhY=; b=DArhCmM13mmU+967Ad0nq4hh1FAO+eGujbYlpXJPV9kzxRjgo937HZx4uEovOa+DM5 MvzxJWMvxmCEHpypj2Ye2PUnawvTwEPfDFkCPX2cqbpbGdaWYR0zJQZDSPSzfjs9vUti wdcOQekvUyywSnXrS1Dm006ZGrIa1jSTOem3EV096Svn1mBU3YZHtikyWsL+ro7w553C rapy2CKtexwivz7WK1JthRV90JMu95t+LlFqDgwvaOYUNtvJ0YMp2XkXYH0VdCMcx7II 2GgUs/TeS1owA1lsXk+Dd+sqfClVmiDyALC29vo0XgV/EzaWNVaE+5Mtv5OXmsnQS66g AGbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-disposition:user-agent; bh=siXs0+Q6llYMAVpY9wwnTMaRUuplRAqDYwNHRyydHhY=; b=AEfavxMwIFG8QOgHFjoDjqJDaok7MJC05YfQtp1HNjwHDKv3yVz7erv6xER2pEDOKO QqF339xbSEtkpIymvNPym5uTOpH0uSaZzbR9MmYAuTCuHIoGAb9k2Eq49S71AwnYByii dreN9sdl2g8uXYvgj89fepPullPcEHiSYew59xFPFBgGZ9BuSbZKNErflb31beZBbBb/ Rw8PWetovixtKjuCYX/kTJPFMl2dID7V4kSnWQAMlZxx33C1mIgT73Srqc5rz7SNH5aG RwMG8IYOwJ0o1aurhu0g6z+ncCPmuERaz0rUJ70Sc7ptEsNXkhXOTZmF4JgmJ/wMJrUp 4UwA== X-Gm-Message-State: AD7BkJJTkX3Vm1liCdX3zsdwmO2xJB8KJLrsT1bg6XyLBZ2bwqbdpMERROinm2ewH6ahQg== X-Received: by 10.98.7.81 with SMTP id b78mr4928931pfd.49.1457785121328; Sat, 12 Mar 2016 04:18:41 -0800 (PST) Received: from gmail.com ([116.202.34.68]) by smtp.gmail.com with ESMTPSA id x64sm19556213pfa.72.2016.03.12.04.18.39 for (version=TLS1_2 cipher=AES128-SHA bits=128/128); Sat, 12 Mar 2016 04:18:40 -0800 (PST) Date: Sat, 12 Mar 2016 17:48:04 +0530 From: Shivani Bhardwaj To: netfilter-devel@vger.kernel.org Subject: [PATCH v3] configure: Show support for connlabel Message-ID: <20160312121804.GA27150@gmail.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Sender: netfilter-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netfilter-devel@vger.kernel.org Add the --disable-connlabel option and the appropriate functionality associated with it. After this patch, iptables configuration shows up as: Iptables Configuration: IPv4 support: yes IPv6 support: yes Devel support: yes IPQ support: no Large file support: yes BPF utils support: no nfsynproxy util support: no nftables support: yes connlabel support: yes Signed-off-by: Shivani Bhardwaj --- Changes in v3: Remove check for libnfnetlink from the if block Changes in v2: Correct the option to disable-connlabel and add code to make it work configure.ac | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/configure.ac b/configure.ac index 33a8f2d..f9bc2a3 100644 --- a/configure.ac +++ b/configure.ac @@ -63,6 +63,10 @@ AC_ARG_WITH([pkgconfigdir], AS_HELP_STRING([--with-pkgconfigdir=PATH], AC_ARG_ENABLE([nftables], AS_HELP_STRING([--disable-nftables], [Do not build nftables compat]), [enable_nftables="$enableval"], [enable_nftables="yes"]) +AC_ARG_ENABLE([connlabel], + AS_HELP_STRING([--disable-connlabel], + [Do not build libnetfilter_conntrack]), + [enable_connlabel="$enableval"], [enable_connlabel="yes"]) libiptc_LDFLAGS2=""; AX_CHECK_LINKER_FLAGS([-Wl,--no-as-needed], @@ -93,15 +97,6 @@ if test "$ac_cv_header_linux_ip_vs_h" != "yes"; then blacklist_modules="$blacklist_modules ipvs"; fi; -PKG_CHECK_MODULES([libnetfilter_conntrack], [libnetfilter_conntrack >= 1.0.4], - [nfconntrack=1], [nfconntrack=0]) -AM_CONDITIONAL([HAVE_LIBNETFILTER_CONNTRACK], [test "$nfconntrack" = 1]) - -if test "$nfconntrack" -ne 1; then - blacklist_modules="$blacklist_modules connlabel"; - echo "WARNING: libnetfilter_conntrack not found, connlabel match will not be built"; -fi; - AC_CHECK_SIZEOF([struct ip6_hdr], [], [#include ]) AM_CONDITIONAL([ENABLE_STATIC], [test "$enable_static" = "yes"]) @@ -114,6 +109,7 @@ AM_CONDITIONAL([ENABLE_LIBIPQ], [test "$enable_libipq" = "yes"]) AM_CONDITIONAL([ENABLE_BPFC], [test "$enable_bpfc" = "yes"]) AM_CONDITIONAL([ENABLE_SYNCONF], [test "$enable_nfsynproxy" = "yes"]) AM_CONDITIONAL([ENABLE_NFTABLES], [test "$enable_nftables" = "yes"]) +AM_CONDITIONAL([ENABLE_CONNLABEL], [test "$enable_connlabel" = "yes"]) if test "x$enable_bpfc" = "xyes" || test "x$enable_nfsynproxy" = "xyes"; then AC_CHECK_LIB(pcap, pcap_compile,, AC_MSG_ERROR(missing libpcap library required by bpf compiler or nfsynproxy tool)) @@ -168,6 +164,21 @@ if test "$nftables" != 1; then blacklist_a_modules="$blacklist_a_modules mangle" fi +if test "x$enable_connlabel" = "xyes"; then + PKG_CHECK_MODULES([libnetfilter_conntrack], + [libnetfilter_conntrack >= 1.0.4], + [nfconntrack=1], [nfconntrack=0]) + + if test "$nfconntrack" -ne 1; then + blacklist_modules="$blacklist_modules connlabel"; + echo "WARNING: libnetfilter_conntrack not found, connlabel match will not be built"; + fi; +else + blacklist_modules="$blacklist_modules connlabel"; +fi; + +AM_CONDITIONAL([HAVE_LIBNETFILTER_CONNTRACK], [test "$nfconntrack" = 1]) + AC_SUBST([blacklist_modules]) AC_SUBST([blacklist_x_modules]) AC_SUBST([blacklist_b_modules]) @@ -243,6 +254,7 @@ Iptables Configuration: BPF utils support: ${enable_bpfc} nfsynproxy util support: ${enable_nfsynproxy} nftables support: ${enable_nftables} + connlabel support: ${enable_connlabel} Build parameters: Put plugins into executable (static): ${enable_static}