net: Allow autoloading conntrack nft-helper-* modules

Submitted by Kirill Tkhai on April 12, 2019, 4:16 p.m.

Details

Message ID 155508579161.22255.5062558521003434510.stgit@localhost.localdomain
State New
Series "net: Allow autoloading conntrack nft-helper-* modules"
Headers show

Commit Message

Kirill Tkhai April 12, 2019, 4:16 p.m.
Otherwise, in case of destination node does not have
modules loaded, CT migration fails.

https://jira.sw.ru/browse/PSBM-90319

Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
---
 kernel/kmod.c |    4 ++++
 1 file changed, 4 insertions(+)

Patch hide | download patch | download mbox

diff --git a/kernel/kmod.c b/kernel/kmod.c
index 2f40ebd4d2b2..a260658f3471 100644
--- a/kernel/kmod.c
+++ b/kernel/kmod.c
@@ -373,6 +373,10 @@  static inline int module_payload_iptable_allowed(const char *module)
 	if (!strncmp("nft-expr-", module, 9))
 		return nft_expr_allowed(module + 9);
 
+	/* The rest of nfct-helper- modules */
+	if (!strncmp("nfct-helper-", module, 12))
+		return mask_ipt_allow(permitted, VE_IP_CONNTRACK);
+
 	return -1;
 }