blob: ad2c1a6f84f74eff0906c3be32d7c3af9024fba3 [file] [log] [blame]
Brad Bishopc342db32019-05-15 21:57:59 -04001SUMMARY = "Tools for managing kernel packet filtering capabilities"
2DESCRIPTION = "iptables is the userspace command line program used to configure and control network packet \
3filtering code in Linux."
4HOMEPAGE = "http://www.netfilter.org/"
5BUGTRACKER = "http://bugzilla.netfilter.org/"
6LICENSE = "GPLv2+"
7LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263\
8 file://iptables/iptables.c;beginline=13;endline=25;md5=c5cffd09974558cf27d0f763df2a12dc"
9
10SRC_URI = "http://netfilter.org/projects/iptables/files/iptables-${PV}.tar.bz2 \
11 file://0001-configure-Add-option-to-enable-disable-libnfnetlink.patch \
12 file://0002-configure.ac-only-check-conntrack-when-libnfnetlink-enabled.patch \
13 file://0003-extensions-format-security-fixes-in-libipt_icmp.patch \
14"
15
16SRC_URI[md5sum] = "944558e88ddcc3b9b0d9550070fa3599"
17SRC_URI[sha256sum] = "a3778b50ed1a3256f9ca975de82c2204e508001fc2471238c8c97f3d1c4c12af"
18
19inherit autotools pkgconfig
20
21EXTRA_OECONF = "--with-kernel=${STAGING_INCDIR}"
22
23PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
24
25PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
26
27# libnfnetlink recipe is in meta-networking layer
28PACKAGECONFIG[libnfnetlink] = "--enable-libnfnetlink,--disable-libnfnetlink,libnfnetlink libnetfilter-conntrack"
29
30# libnftnl recipe is in meta-networking layer(previously known as libnftables)
31PACKAGECONFIG[libnftnl] = "--enable-nftables,--disable-nftables,libnftnl"
32
33do_configure_prepend() {
34 # Remove some libtool m4 files
35 # Keep ax_check_linker_flags.m4 which belongs to autoconf-archive.
36 rm -f libtool.m4 lt~obsolete.m4 ltoptions.m4 ltsugar.m4 ltversion.m4
37}
38
39PACKAGES += "${PN}-modules"
40PACKAGES_DYNAMIC += "^${PN}-module-.*"
41
42python populate_packages_prepend() {
43 modules = do_split_packages(d, '${libdir}/xtables', r'lib(.*)\.so$', '${PN}-module-%s', '${PN} module %s', extra_depends='')
44 if modules:
45 metapkg = d.getVar('PN') + '-modules'
46 d.appendVar('RDEPENDS_' + metapkg, ' ' + ' '.join(modules))
47}
48
49FILES_${PN} += "${datadir}/xtables"
50
51ALLOW_EMPTY_${PN}-modules = "1"
52
53RDEPENDS_${PN} = "${PN}-module-xt-standard"
54RRECOMMENDS_${PN} = " \
55 ${PN}-modules \
56 kernel-module-x-tables \
57 kernel-module-ip-tables \
58 kernel-module-iptable-filter \
59 kernel-module-iptable-nat \
60 kernel-module-nf-defrag-ipv4 \
61 kernel-module-nf-conntrack \
62 kernel-module-nf-conntrack-ipv4 \
63 kernel-module-nf-nat \
64 kernel-module-ipt-masquerade \
65"