Makefile 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706
  1. #
  2. # Copyright (C) 2006-2016 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. include $(INCLUDE_DIR)/kernel.mk
  9. PKG_NAME:=iptables
  10. PKG_VERSION:=1.8.3
  11. PKG_RELEASE:=1
  12. PKG_SOURCE_URL:=https://netfilter.org/projects/iptables/files
  13. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  14. PKG_HASH:=a23cac034181206b4545f4e7e730e76e08b5f3dd78771ba9645a6756de9cdd80
  15. PKG_FIXUP:=autoreconf
  16. PKG_FLAGS:=nonshared
  17. PKG_INSTALL:=1
  18. PKG_BUILD_PARALLEL:=1
  19. PKG_LICENSE:=GPL-2.0
  20. PKG_CPE_ID:=cpe:/a:netfilter_core_team:iptables
  21. include $(INCLUDE_DIR)/package.mk
  22. ifeq ($(DUMP),)
  23. -include $(LINUX_DIR)/.config
  24. include $(INCLUDE_DIR)/netfilter.mk
  25. STAMP_CONFIGURED:=$(strip $(STAMP_CONFIGURED))_$(shell grep 'NETFILTER' $(LINUX_DIR)/.config | mkhash md5)
  26. endif
  27. define Package/iptables/Default
  28. SECTION:=net
  29. CATEGORY:=Network
  30. SUBMENU:=Firewall
  31. URL:=https://netfilter.org/
  32. endef
  33. define Package/iptables/Module
  34. $(call Package/iptables/Default)
  35. DEPENDS:=iptables $(1)
  36. endef
  37. define Package/iptables
  38. $(call Package/iptables/Default)
  39. TITLE:=IP firewall administration tool
  40. MENU:=1
  41. DEPENDS+= +kmod-ipt-core +libip4tc +IPV6:libip6tc +libxtables
  42. endef
  43. define Package/iptables/config
  44. config IPTABLES_CONNLABEL
  45. bool "Enable Connlabel support"
  46. default n
  47. help
  48. This enable connlabel support in iptables.
  49. config IPTABLES_NFTABLES
  50. bool "Enable Nftables support"
  51. default n
  52. help
  53. This enable nftables support in iptables.
  54. endef
  55. define Package/iptables/description
  56. IP firewall administration tool.
  57. Matches:
  58. - icmp
  59. - tcp
  60. - udp
  61. - comment
  62. - conntrack
  63. - limit
  64. - mac
  65. - mark
  66. - multiport
  67. - set
  68. - state
  69. - time
  70. Targets:
  71. - ACCEPT
  72. - CT
  73. - DNAT
  74. - DROP
  75. - REJECT
  76. - FLOWOFFLOAD
  77. - LOG
  78. - MARK
  79. - MASQUERADE
  80. - REDIRECT
  81. - SET
  82. - SNAT
  83. - TCPMSS
  84. Tables:
  85. - filter
  86. - mangle
  87. - nat
  88. - raw
  89. endef
  90. define Package/iptables-nft
  91. $(call Package/iptables/Default)
  92. TITLE:=IP firewall administration tool nft
  93. DEPENDS:=iptables @IPTABLES_NFTABLES +libxtables-nft
  94. endef
  95. define Package/iptables-nft/description
  96. Extra iptables nftables nft binaries.
  97. iptables-nft
  98. iptables-nft-restore
  99. iptables-nft-save
  100. iptables-translate
  101. iptables-restore-translate
  102. endef
  103. define Package/iptables-mod-conntrack-extra
  104. $(call Package/iptables/Module, +kmod-ipt-conntrack-extra +kmod-ipt-raw)
  105. TITLE:=Extra connection tracking extensions
  106. endef
  107. define Package/iptables-mod-conntrack-extra/description
  108. Extra iptables extensions for connection tracking.
  109. Matches:
  110. - connbytes
  111. - connlimit
  112. - connmark
  113. - recent
  114. - helper
  115. Targets:
  116. - CONNMARK
  117. endef
  118. define Package/iptables-mod-conntrack-label
  119. $(call Package/iptables/Module, +kmod-ipt-conntrack-label @IPTABLES_CONNLABEL)
  120. TITLE:=Connection tracking labeling extension
  121. DEFAULT:=y if IPTABLES_CONNLABEL
  122. endef
  123. define Package/iptables-mod-conntrack-label/description
  124. Match and set label(s) on connection tracking entries
  125. Matches:
  126. - connlabel
  127. endef
  128. define Package/iptables-mod-filter
  129. $(call Package/iptables/Module, +kmod-ipt-filter)
  130. TITLE:=Content inspection extensions
  131. endef
  132. define Package/iptables-mod-filter/description
  133. iptables extensions for packet content inspection.
  134. Includes support for:
  135. Matches:
  136. - string
  137. - bpf
  138. endef
  139. define Package/iptables-mod-ipopt
  140. $(call Package/iptables/Module, +kmod-ipt-ipopt)
  141. TITLE:=IP/Packet option extensions
  142. endef
  143. define Package/iptables-mod-ipopt/description
  144. iptables extensions for matching/changing IP packet options.
  145. Matches:
  146. - dscp
  147. - ecn
  148. - length
  149. - statistic
  150. - tcpmss
  151. - unclean
  152. - hl
  153. Targets:
  154. - DSCP
  155. - CLASSIFY
  156. - ECN
  157. - HL
  158. endef
  159. define Package/iptables-mod-ipsec
  160. $(call Package/iptables/Module, +kmod-ipt-ipsec)
  161. TITLE:=IPsec extensions
  162. endef
  163. define Package/iptables-mod-ipsec/description
  164. iptables extensions for matching ipsec traffic.
  165. Matches:
  166. - ah
  167. - esp
  168. - policy
  169. endef
  170. define Package/iptables-mod-nat-extra
  171. $(call Package/iptables/Module, +kmod-ipt-nat-extra)
  172. TITLE:=Extra NAT extensions
  173. endef
  174. define Package/iptables-mod-nat-extra/description
  175. iptables extensions for extra NAT targets.
  176. Targets:
  177. - MIRROR
  178. - NETMAP
  179. endef
  180. define Package/iptables-mod-ulog
  181. $(call Package/iptables/Module, +kmod-ipt-ulog)
  182. TITLE:=user-space packet logging
  183. endef
  184. define Package/iptables-mod-ulog/description
  185. iptables extensions for user-space packet logging.
  186. Targets:
  187. - ULOG
  188. endef
  189. define Package/iptables-mod-nflog
  190. $(call Package/iptables/Module, +kmod-nfnetlink-log +kmod-ipt-nflog)
  191. TITLE:=Netfilter NFLOG target
  192. endef
  193. define Package/iptables-mod-nflog/description
  194. iptables extension for user-space logging via NFNETLINK.
  195. Includes:
  196. - libxt_NFLOG
  197. endef
  198. define Package/iptables-mod-trace
  199. $(call Package/iptables/Module, +kmod-ipt-debug)
  200. TITLE:=Netfilter TRACE target
  201. endef
  202. define Package/iptables-mod-trace/description
  203. iptables extension for TRACE target
  204. Includes:
  205. - libxt_TRACE
  206. endef
  207. define Package/iptables-mod-nfqueue
  208. $(call Package/iptables/Module, +kmod-nfnetlink-queue +kmod-ipt-nfqueue)
  209. TITLE:=Netfilter NFQUEUE target
  210. endef
  211. define Package/iptables-mod-nfqueue/description
  212. iptables extension for user-space queuing via NFNETLINK.
  213. Includes:
  214. - libxt_NFQUEUE
  215. endef
  216. define Package/iptables-mod-hashlimit
  217. $(call Package/iptables/Module, +kmod-ipt-hashlimit)
  218. TITLE:=hashlimit matching
  219. endef
  220. define Package/iptables-mod-hashlimit/description
  221. iptables extensions for hashlimit matching
  222. Matches:
  223. - hashlimit
  224. endef
  225. define Package/iptables-mod-rpfilter
  226. $(call Package/iptables/Module, +kmod-ipt-rpfilter)
  227. TITLE:=rpfilter iptables extension
  228. endef
  229. define Package/iptables-mod-rpfilter/description
  230. iptables extensions for reverse path filter test on a packet
  231. Matches:
  232. - rpfilter
  233. endef
  234. define Package/iptables-mod-iprange
  235. $(call Package/iptables/Module, +kmod-ipt-iprange)
  236. TITLE:=IP range extension
  237. endef
  238. define Package/iptables-mod-iprange/description
  239. iptables extensions for matching ip ranges.
  240. Matches:
  241. - iprange
  242. endef
  243. define Package/iptables-mod-cluster
  244. $(call Package/iptables/Module, +kmod-ipt-cluster)
  245. TITLE:=Match cluster extension
  246. endef
  247. define Package/iptables-mod-cluster/description
  248. iptables extensions for matching cluster.
  249. Netfilter (IPv4/IPv6) module for matching cluster
  250. This option allows you to build work-load-sharing clusters of
  251. network servers/stateful firewalls without having a dedicated
  252. load-balancing router/server/switch. Basically, this match returns
  253. true when the packet must be handled by this cluster node. Thus,
  254. all nodes see all packets and this match decides which node handles
  255. what packets. The work-load sharing algorithm is based on source
  256. address hashing.
  257. This module is usable for ipv4 and ipv6.
  258. If you select it, it enables kmod-ipt-cluster.
  259. see `iptables -m cluster --help` for more information.
  260. endef
  261. define Package/iptables-mod-clusterip
  262. $(call Package/iptables/Module, +kmod-ipt-clusterip)
  263. TITLE:=Clusterip extension
  264. endef
  265. define Package/iptables-mod-clusterip/description
  266. iptables extensions for CLUSTERIP.
  267. The CLUSTERIP target allows you to build load-balancing clusters of
  268. network servers without having a dedicated load-balancing
  269. router/server/switch.
  270. If you select it, it enables kmod-ipt-clusterip.
  271. see `iptables -j CLUSTERIP --help` for more information.
  272. endef
  273. define Package/iptables-mod-extra
  274. $(call Package/iptables/Module, +kmod-ipt-extra)
  275. TITLE:=Other extra iptables extensions
  276. endef
  277. define Package/iptables-mod-extra/description
  278. Other extra iptables extensions.
  279. Matches:
  280. - addrtype
  281. - condition
  282. - owner
  283. - pkttype
  284. - quota
  285. endef
  286. define Package/iptables-mod-physdev
  287. $(call Package/iptables/Module, +kmod-ipt-physdev)
  288. TITLE:=physdev iptables extension
  289. endef
  290. define Package/iptables-mod-physdev/description
  291. The iptables physdev match.
  292. endef
  293. define Package/iptables-mod-led
  294. $(call Package/iptables/Module, +kmod-ipt-led)
  295. TITLE:=LED trigger iptables extension
  296. endef
  297. define Package/iptables-mod-led/description
  298. iptables extension for triggering a LED.
  299. Targets:
  300. - LED
  301. endef
  302. define Package/iptables-mod-tproxy
  303. $(call Package/iptables/Module, +kmod-ipt-tproxy)
  304. TITLE:=Transparent proxy iptables extensions
  305. endef
  306. define Package/iptables-mod-tproxy/description
  307. Transparent proxy iptables extensions.
  308. Matches:
  309. - socket
  310. Targets:
  311. - TPROXY
  312. endef
  313. define Package/iptables-mod-tee
  314. $(call Package/iptables/Module, +kmod-ipt-tee)
  315. TITLE:=TEE iptables extensions
  316. endef
  317. define Package/iptables-mod-tee/description
  318. TEE iptables extensions.
  319. Targets:
  320. - TEE
  321. endef
  322. define Package/iptables-mod-u32
  323. $(call Package/iptables/Module, +kmod-ipt-u32)
  324. TITLE:=U32 iptables extensions
  325. endef
  326. define Package/iptables-mod-u32/description
  327. U32 iptables extensions.
  328. Matches:
  329. - u32
  330. endef
  331. define Package/iptables-mod-checksum
  332. $(call Package/iptables/Module, +kmod-ipt-checksum)
  333. TITLE:=IP CHECKSUM target extension
  334. endef
  335. define Package/iptables-mod-checksum/description
  336. iptables extension for the CHECKSUM calculation target
  337. endef
  338. define Package/ip6tables
  339. $(call Package/iptables/Default)
  340. DEPENDS:=@IPV6 +kmod-ip6tables +iptables
  341. CATEGORY:=Network
  342. TITLE:=IPv6 firewall administration tool
  343. MENU:=1
  344. endef
  345. define Package/ip6tables-nft
  346. $(call Package/iptables/Default)
  347. DEPENDS:=ip6tables @IPTABLES_NFTABLES +libxtables-nft
  348. TITLE:=IP firewall administration tool nft
  349. endef
  350. define Package/ip6tables-nft/description
  351. Extra ip6tables nftables nft binaries.
  352. iptables-nft
  353. iptables-nft-restore
  354. iptables-nft-save
  355. iptables-translate
  356. iptables-restore-translate
  357. endef
  358. define Package/ip6tables-extra
  359. $(call Package/iptables/Default)
  360. DEPENDS:=ip6tables +kmod-ip6tables-extra
  361. TITLE:=IPv6 header matching modules
  362. endef
  363. define Package/ip6tables-mod-extra/description
  364. iptables header matching modules for IPv6
  365. endef
  366. define Package/ip6tables-mod-nat
  367. $(call Package/iptables/Default)
  368. DEPENDS:=ip6tables +kmod-ipt-nat6
  369. TITLE:=IPv6 NAT extensions
  370. endef
  371. define Package/ip6tables-mod-nat/description
  372. iptables extensions for IPv6-NAT targets.
  373. endef
  374. define Package/libiptc
  375. $(call Package/iptables/Default)
  376. SECTION:=libs
  377. CATEGORY:=Libraries
  378. DEPENDS:=+libip4tc +libip6tc +libxtables
  379. ABI_VERSION:=0
  380. TITLE:=IPv4/IPv6 firewall - shared libiptc library (nf compatibility stub)
  381. endef
  382. define Package/libip4tc
  383. $(call Package/iptables/Default)
  384. SECTION:=libs
  385. CATEGORY:=Libraries
  386. TITLE:=IPv4 firewall - shared libiptc library
  387. ABI_VERSION:=2
  388. DEPENDS:=+libxtables
  389. endef
  390. define Package/libip6tc
  391. $(call Package/iptables/Default)
  392. SECTION:=libs
  393. CATEGORY:=Libraries
  394. TITLE:=IPv6 firewall - shared libiptc library
  395. ABI_VERSION:=2
  396. DEPENDS:=+libxtables
  397. endef
  398. define Package/libxtables
  399. $(call Package/iptables/Default)
  400. SECTION:=libs
  401. CATEGORY:=Libraries
  402. TITLE:=IPv4/IPv6 firewall - shared xtables library
  403. ABI_VERSION:=12
  404. DEPENDS:= \
  405. +IPTABLES_CONNLABEL:libnetfilter-conntrack \
  406. +IPTABLES_NFTABLES:libnftnl
  407. endef
  408. define Package/libxtables-nft
  409. $(call Package/iptables/Default)
  410. SECTION:=libs
  411. CATEGORY:=Libraries
  412. TITLE:=IPv4/IPv6 firewall - shared xtables nft library
  413. ABI_VERSION:=12
  414. DEPENDS:=libxtables
  415. endef
  416. TARGET_CPPFLAGS := \
  417. -I$(PKG_BUILD_DIR)/include \
  418. -I$(LINUX_DIR)/user_headers/include \
  419. $(TARGET_CPPFLAGS)
  420. TARGET_CFLAGS += \
  421. -I$(PKG_BUILD_DIR)/include \
  422. -I$(LINUX_DIR)/user_headers/include \
  423. -ffunction-sections -fdata-sections \
  424. -DNO_LEGACY
  425. TARGET_LDFLAGS += \
  426. -Wl,--gc-sections
  427. CONFIGURE_ARGS += \
  428. --enable-shared \
  429. --enable-static \
  430. --enable-devel \
  431. --with-kernel="$(LINUX_DIR)/user_headers" \
  432. --with-xtlibdir=/usr/lib/iptables \
  433. --with-xt-lock-name=/var/run/xtables.lock \
  434. $(if $(CONFIG_IPTABLES_CONNLABEL),,--disable-connlabel) \
  435. $(if $(CONFIG_IPTABLES_NFTABLES),,--disable-nftables) \
  436. $(if $(CONFIG_IPV6),,--disable-ipv6)
  437. MAKE_FLAGS := \
  438. $(TARGET_CONFIGURE_OPTS) \
  439. COPT_FLAGS="$(TARGET_CFLAGS)" \
  440. KERNEL_DIR="$(LINUX_DIR)/user_headers/" PREFIX=/usr \
  441. KBUILD_OUTPUT="$(LINUX_DIR)" \
  442. BUILTIN_MODULES="$(patsubst ip6t_%,%,$(patsubst ipt_%,%,$(patsubst xt_%,%,$(IPT_BUILTIN) $(IPT_CONNTRACK-m) $(IPT_NAT-m))))"
  443. ifneq ($(wildcard $(PKG_BUILD_DIR)/.config_*),$(subst .configured_,.config_,$(STAMP_CONFIGURED)))
  444. define Build/Configure/rebuild
  445. $(FIND) $(PKG_BUILD_DIR) -name \*.o -or -name \*.\?o -or -name \*.a | $(XARGS) rm -f
  446. rm -f $(PKG_BUILD_DIR)/.config_*
  447. rm -f $(PKG_BUILD_DIR)/.configured_*
  448. touch $(subst .configured_,.config_,$(STAMP_CONFIGURED))
  449. endef
  450. endif
  451. define Build/Configure
  452. $(Build/Configure/rebuild)
  453. $(Build/Configure/Default)
  454. endef
  455. define Build/InstallDev
  456. $(INSTALL_DIR) $(1)/usr/include
  457. $(INSTALL_DIR) $(1)/usr/include/iptables
  458. $(INSTALL_DIR) $(1)/usr/include/net/netfilter
  459. # XXX: iptables header fixup, some headers are not installed by iptables anymore
  460. $(CP) $(PKG_BUILD_DIR)/include/iptables/*.h $(1)/usr/include/iptables/
  461. $(CP) $(PKG_BUILD_DIR)/include/iptables.h $(1)/usr/include/
  462. $(CP) $(PKG_BUILD_DIR)/include/ip6tables.h $(1)/usr/include/
  463. $(CP) $(PKG_BUILD_DIR)/include/libipulog $(1)/usr/include/
  464. $(CP) $(PKG_BUILD_DIR)/include/libiptc $(1)/usr/include/
  465. $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
  466. $(INSTALL_DIR) $(1)/usr/lib
  467. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libxtables.so* $(1)/usr/lib/
  468. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libip*tc.so* $(1)/usr/lib/
  469. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  470. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/xtables.pc $(1)/usr/lib/pkgconfig/
  471. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libip*tc.pc $(1)/usr/lib/pkgconfig/
  472. # XXX: needed by firewall3
  473. $(CP) $(PKG_BUILD_DIR)/extensions/libiptext*.so $(1)/usr/lib/
  474. endef
  475. define Package/iptables/install
  476. $(INSTALL_DIR) $(1)/usr/sbin
  477. $(CP) $(PKG_INSTALL_DIR)/usr/sbin/xtables-legacy-multi $(1)/usr/sbin/
  478. $(CP) $(PKG_INSTALL_DIR)/usr/sbin/iptables{,-restore,-save} $(1)/usr/sbin/
  479. $(INSTALL_DIR) $(1)/usr/lib/iptables
  480. endef
  481. define Package/iptables-nft/install
  482. $(INSTALL_DIR) $(1)/usr/sbin
  483. $(CP) $(PKG_INSTALL_DIR)/usr/sbin/xtables-nft-multi $(1)/usr/sbin/
  484. $(CP) $(PKG_INSTALL_DIR)/usr/sbin/iptables-nft{,-restore,-save} $(1)/usr/sbin/
  485. $(CP) $(PKG_INSTALL_DIR)/usr/sbin/iptables{,-restore}-translate $(1)/usr/sbin/
  486. endef
  487. define Package/ip6tables/install
  488. $(INSTALL_DIR) $(1)/usr/sbin
  489. $(CP) $(PKG_INSTALL_DIR)/usr/sbin/ip6tables{,-restore,-save} $(1)/usr/sbin/
  490. endef
  491. define Package/ip6tables-nft/install
  492. $(INSTALL_DIR) $(1)/usr/sbin
  493. $(CP) $(PKG_INSTALL_DIR)/usr/sbin/ip6tables-nft{,-restore,-save} $(1)/usr/sbin/
  494. $(CP) $(PKG_INSTALL_DIR)/usr/sbin/ip6tables{,-restore}-translate $(1)/usr/sbin/
  495. endef
  496. define Package/libiptc/install
  497. $(INSTALL_DIR) $(1)/usr/lib
  498. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libiptc.so.* $(1)/usr/lib/
  499. endef
  500. define Package/libip4tc/install
  501. $(INSTALL_DIR) $(1)/usr/lib
  502. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libip4tc.so.* $(1)/usr/lib/
  503. $(CP) $(PKG_BUILD_DIR)/extensions/libiptext4.so $(1)/usr/lib/
  504. endef
  505. define Package/libip6tc/install
  506. $(INSTALL_DIR) $(1)/usr/lib
  507. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libip6tc.so.* $(1)/usr/lib/
  508. $(CP) $(PKG_BUILD_DIR)/extensions/libiptext6.so $(1)/usr/lib/
  509. endef
  510. define Package/libxtables/install
  511. $(INSTALL_DIR) $(1)/usr/lib
  512. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libxtables.so.* $(1)/usr/lib/
  513. $(CP) $(PKG_BUILD_DIR)/extensions/libiptext.so $(1)/usr/lib/
  514. endef
  515. define Package/libxtables-nft/install
  516. $(INSTALL_DIR) $(1)/usr/lib
  517. $(CP) $(PKG_BUILD_DIR)/extensions/libiptext_*.so $(1)/usr/lib/
  518. endef
  519. define BuildPlugin
  520. define Package/$(1)/install
  521. $(INSTALL_DIR) $$(1)/usr/lib/iptables
  522. for m in $(patsubst xt_%,ipt_%,$(2)) $(patsubst ipt_%,xt_%,$(2)) $(patsubst xt_%,ip6t_%,$(2)) $(patsubst ip6t_%,xt_%,$(2)); do \
  523. if [ -f $(PKG_INSTALL_DIR)/usr/lib/iptables/lib$$$$$$$${m}.so ]; then \
  524. $(CP) $(PKG_INSTALL_DIR)/usr/lib/iptables/lib$$$$$$$${m}.so $$(1)/usr/lib/iptables/ ; \
  525. fi; \
  526. done
  527. $(3)
  528. endef
  529. $$(eval $$(call BuildPackage,$(1)))
  530. endef
  531. $(eval $(call BuildPackage,iptables))
  532. $(eval $(call BuildPackage,iptables-nft))
  533. $(eval $(call BuildPlugin,iptables-mod-conntrack-extra,$(IPT_CONNTRACK_EXTRA-m)))
  534. $(eval $(call BuildPlugin,iptables-mod-conntrack-label,$(IPT_CONNTRACK_LABEL-m)))
  535. $(eval $(call BuildPlugin,iptables-mod-extra,$(IPT_EXTRA-m)))
  536. $(eval $(call BuildPlugin,iptables-mod-physdev,$(IPT_PHYSDEV-m)))
  537. $(eval $(call BuildPlugin,iptables-mod-filter,$(IPT_FILTER-m)))
  538. $(eval $(call BuildPlugin,iptables-mod-ipopt,$(IPT_IPOPT-m)))
  539. $(eval $(call BuildPlugin,iptables-mod-ipsec,$(IPT_IPSEC-m)))
  540. $(eval $(call BuildPlugin,iptables-mod-nat-extra,$(IPT_NAT_EXTRA-m)))
  541. $(eval $(call BuildPlugin,iptables-mod-iprange,$(IPT_IPRANGE-m)))
  542. $(eval $(call BuildPlugin,iptables-mod-cluster,$(IPT_CLUSTER-m)))
  543. $(eval $(call BuildPlugin,iptables-mod-clusterip,$(IPT_CLUSTERIP-m)))
  544. $(eval $(call BuildPlugin,iptables-mod-ulog,$(IPT_ULOG-m)))
  545. $(eval $(call BuildPlugin,iptables-mod-hashlimit,$(IPT_HASHLIMIT-m)))
  546. $(eval $(call BuildPlugin,iptables-mod-rpfilter,$(IPT_RPFILTER-m)))
  547. $(eval $(call BuildPlugin,iptables-mod-led,$(IPT_LED-m)))
  548. $(eval $(call BuildPlugin,iptables-mod-tproxy,$(IPT_TPROXY-m)))
  549. $(eval $(call BuildPlugin,iptables-mod-tee,$(IPT_TEE-m)))
  550. $(eval $(call BuildPlugin,iptables-mod-u32,$(IPT_U32-m)))
  551. $(eval $(call BuildPlugin,iptables-mod-nflog,$(IPT_NFLOG-m)))
  552. $(eval $(call BuildPlugin,iptables-mod-trace,$(IPT_DEBUG-m)))
  553. $(eval $(call BuildPlugin,iptables-mod-nfqueue,$(IPT_NFQUEUE-m)))
  554. $(eval $(call BuildPlugin,iptables-mod-checksum,$(IPT_CHECKSUM-m)))
  555. $(eval $(call BuildPackage,ip6tables))
  556. $(eval $(call BuildPackage,ip6tables-nft))
  557. $(eval $(call BuildPlugin,ip6tables-extra,$(IPT_IPV6_EXTRA-m)))
  558. $(eval $(call BuildPlugin,ip6tables-mod-nat,$(IPT_NAT6-m)))
  559. $(eval $(call BuildPackage,libiptc))
  560. $(eval $(call BuildPackage,libip4tc))
  561. $(eval $(call BuildPackage,libip6tc))
  562. $(eval $(call BuildPackage,libxtables))
  563. $(eval $(call BuildPackage,libxtables-nft))