]> git.proxmox.com Git - mirror_iproute2.git/commit
tc, ipt: don't enforce iproute2 dependency on iptables-devel
authorDaniel Borkmann <daniel@iogearbox.net>
Tue, 18 Oct 2016 12:13:09 +0000 (14:13 +0200)
committerStephen Hemminger <stephen@networkplumber.org>
Wed, 26 Oct 2016 17:58:22 +0000 (10:58 -0700)
commit4710e46ec31837254346766ed286f484ee61f24f
tree645ba7d6c178e4a07c49533df0fa993c3922f77b
parent7a34b9d098fce6778a02c475fd877e0b34aa7a13
tc, ipt: don't enforce iproute2 dependency on iptables-devel

Since 5cd1adba79d3 ("Update to current iptables headers") compilation
of iproute2 broke for systems without iptables-devel package [1].
Reason is that even though we fall back to build m_ipt.c, the include
depends on a xtables-version.h header, which only ships with
iptables-devel. Machines not having this package fail compilation with:

    [...]
    CC       m_ipt.o
In file included from ../include/iptables.h:5:0,
                 from m_ipt.c:17:
../include/xtables.h:34:29: fatal error: xtables-version.h: No such file or directory
compilation terminated.
../Config:31: recipe for target 'm_ipt.o' failed
make[1]: *** [m_ipt.o] Error 1

The configure script only barks that package xtables was not found in
the pkg-config search path. The generated Config then only contains f.e.
TC_CONFIG_IPSET. In tc's Makefile we thus fall back to adding m_ipt.o
to TCMODULES. m_ipt.c then includes the local include/iptables.h header
copy, which includes the include/xtables.h copy. Latter then includes
xtables-version.h, which only ships with iptables-devel.

One way to resolve this is to skip this whole mess when pkg-config has
no xtables config available. I've carried something along these lines
locally for a while now, but it's just too annyoing. :/ Build works fine
now also when xtables.pc is not available.

  [1] http://www.spinics.net/lists/netdev/msg366162.html

Fixes: 5cd1adba79d3 ("Update to current iptables headers")
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
configure
tc/Makefile