Skip to contentSkip to conversation

net: nf_tables: Support auto-loading for inet nat

PATCH Applied Phil Sutter 2 participants 2 messages Jul 17, 2019 – Jul 18, 2019

Subsystems (2)
lore
Share & tools
lore

Phil Sutter

author reviewer
#0 lore raw

PATCH 1/1 net: nf_tables: Support auto-loading for inet nat

Trying to create an inet family nat chain would not cause nft_chain_nat.ko module to auto-load due to missing module alias. Add a proper one with hard-coded family value 1 for the pseudo-family NFPROTO_INET.

---
Changes since RFC:
- Go with hard-coding the value for now like in nf_flow_table_inet.c.
- Adjust subject and commit message a bit.

---
 net/netfilter/nft_chain_nat.c | 3 +++
 1 file changed, 3 insertions(+)
net/netfilter/nft_chain_nat.c +3 -0
index 2f89bde3c61cb..ff9ac8ae0031f 100644
@@ -142,3 +142,6 @@ MODULE_ALIAS_NFT_CHAIN(AF_INET, "nat");
 #ifdef CONFIG_NF_TABLES_IPV6
 MODULE_ALIAS_NFT_CHAIN(AF_INET6, "nat");
 #endif
+#ifdef CONFIG_NF_TABLES_INET
+MODULE_ALIAS_NFT_CHAIN(1, "nat");	/* NFPROTO_INET */
+#endif
Signature · 1 line
2.22.0
maintainer Applied
#1 lore raw
Quoted 4 lines · Phil Sutter

Trying to create an inet family nat chain would not cause nft_chain_nat.ko module to auto-load due to missing module alias. Add a proper one with hard-coded family value 1 for the pseudo-family NFPROTO_INET.

Applied, thanks Phil.