Patchwork [PATCHv2] iptables: link against libnetfilter_conntrack

login
register
mail settings
Submitter Gustavo Zacarias
Date Aug. 13, 2013, 4:37 p.m.
Message ID <1376411824-22311-1-git-send-email-gustavo@zacarias.com.ar>
Download mbox | patch
Permalink /patch/266886/
State Not Applicable
Headers show

Comments

Gustavo Zacarias - Aug. 13, 2013, 4:37 p.m.
When libnetfilter_conntrack is available iptables needs to link
against it otherwise we get build failures.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
---
 iptables/Makefile.am | 3 +++
 1 file changed, 3 insertions(+)

--
1.8.1.5

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Florian Westphal - Aug. 13, 2013, 6:59 p.m.
Gustavo Zacarias <gustavo@zacarias.com.ar> wrote:
> When libnetfilter_conntrack is available iptables needs to link
> against it otherwise we get build failures.

Again, I doubt that this is the case.

The only caller of libnetfilter_conntrack functions is libxt_connlabel,
and that is not tied to the xtables-multi binary, UNLESS you
build with --enable-static (which puts the extensions into the
executable).  So, afaiu, we should not need -lnetfilter_conntrack in the
!ENABLE_STATIC case.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/iptables/Makefile.am b/iptables/Makefile.am
index a4246eb..6390b7c 100644
--- a/iptables/Makefile.am
+++ b/iptables/Makefile.am
@@ -21,6 +21,9 @@  xtables_multi_SOURCES += ip6tables-save.c ip6tables-restore.c \
 xtables_multi_CFLAGS  += -DENABLE_IPV6
 xtables_multi_LDADD   += ../libiptc/libip6tc.la ../extensions/libext6.a
 endif
+if HAVE_LIBNETFILTER_CONNTRACK
+xtables_multi_LDADD += @libnetfilter_conntrack_LIBS@
+endif
 xtables_multi_SOURCES += xshared.c
 xtables_multi_LDADD   += ../libxtables/libxtables.la -lm