Skip to content

Commit

Permalink
iptables: add xtables-nft package
Browse files Browse the repository at this point in the history
This allows to install ip6tables-nft without iptables-nft
This prepare the addition of {arp,eb}tables-nft

Signed-off-by: Etienne Champetier <champetier.etienne@gmail.com>
  • Loading branch information
champtar authored and hauke committed Mar 19, 2022
1 parent afb6824 commit c913be1
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions package/network/utils/iptables/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,16 @@ IP firewall administration tool.

endef

define Package/xtables-nft
$(call Package/iptables/Default)
TITLE:=IP firewall administration tool nft
DEPENDS:=@IPTABLES_NFTABLES +libnftnl +libiptext +IPV6:libiptext6 +libiptext-nft +kmod-nft-compat
endef

define Package/iptables-nft
$(call Package/iptables/Default)
TITLE:=IP firewall administration tool nft
DEPENDS:=@IPTABLES_NFTABLES +libnftnl +libiptext +IPV6:libiptext6 +libiptext-nft +kmod-ipt-core +kmod-nft-compat
DEPENDS:=+kmod-ipt-core +xtables-nft
PROVIDES:=iptables
ALTERNATIVES:=\
300:/usr/sbin/iptables:/usr/sbin/xtables-nft-multi \
Expand Down Expand Up @@ -469,7 +475,7 @@ endef

define Package/ip6tables-nft
$(call Package/iptables/Default)
DEPENDS:=@IPV6 +kmod-ip6tables +iptables-nft
DEPENDS:=@IPV6 +kmod-ip6tables +xtables-nft
TITLE:=IP firewall administration tool nft
PROVIDES:=ip6tables
ALTERNATIVES:=\
Expand Down Expand Up @@ -655,9 +661,13 @@ define Package/iptables-legacy/install
$(INSTALL_DIR) $(1)/usr/lib/iptables
endef

define Package/iptables-nft/install
define Package/xtables-nft/install
$(INSTALL_DIR) $(1)/usr/sbin
$(CP) $(PKG_INSTALL_DIR)/usr/sbin/xtables-nft-multi $(1)/usr/sbin/
endef

define Package/iptables-nft/install
$(INSTALL_DIR) $(1)/usr/sbin
$(CP) $(PKG_INSTALL_DIR)/usr/sbin/iptables-nft{,-restore,-save} $(1)/usr/sbin/
$(CP) $(PKG_INSTALL_DIR)/usr/sbin/iptables{,-restore}-translate $(1)/usr/sbin/
endef
Expand Down Expand Up @@ -726,6 +736,7 @@ $(eval $(call BuildPackage,libiptext6))
$(eval $(call BuildPackage,libiptext-nft))
$(eval $(call BuildPackage,xtables-legacy))
$(eval $(call BuildPackage,iptables-legacy))
$(eval $(call BuildPackage,xtables-nft))
$(eval $(call BuildPackage,iptables-nft))
$(eval $(call BuildPlugin,iptables-mod-conntrack-extra,$(IPT_CONNTRACK_EXTRA-m)))
$(eval $(call BuildPlugin,iptables-mod-conntrack-label,$(IPT_CONNTRACK_LABEL-m)))
Expand Down

0 comments on commit c913be1

Please sign in to comment.