1 Star 0 Fork 35

cf-zhao/criu

forked from src-openEuler/criu 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0060-net-switch-to-nftables-API.patch 1.73 KB
一键复制 编辑 原始数据 按行查看 历史
river 提交于 2022-04-13 15:05 . criu: backport kinds of features/bugfix
From 073ed2ef448fb073aa3c6f0552e120e3e98a8906 Mon Sep 17 00:00:00 2001
From: "fu.lin" <fulin10@huawei.com>
Date: Wed, 13 Apr 2022 14:30:54 +0800
Subject: [PATCH 60/72] net: switch to nftables API
This is fake patch
Signed-off-by: fu.lin <fulin10@huawei.com>
---
criu/config.c | 2 ++
criu/crtools.c | 1 +
criu/include/cr_options.h | 2 ++
3 files changed, 5 insertions(+)
diff --git a/criu/config.c b/criu/config.c
index c0358e5..7c4e230 100644
--- a/criu/config.c
+++ b/criu/config.c
@@ -711,6 +711,8 @@ int parse_options(int argc, char **argv, bool *usage_error, bool *has_exec_cmd,
{ "reserve-ports", required_argument, 0, 'P' },
BOOL_OPT("parallel", &opts.parallel),
{ "exec-pin-start", required_argument, 0, 2002 },
+ BOOL_OPT("use-nft", &opts.use_nft),
+ BOOL_OPT("async-clear-nft", &opts.async_clear_nft),
{},
};
diff --git a/criu/crtools.c b/criu/crtools.c
index 40e2d51..c555213 100644
--- a/criu/crtools.c
+++ b/criu/crtools.c
@@ -474,6 +474,7 @@ usage:
" --reserve-ports Reserve src ports in kernel\n"
" --parallel Collect smaps parallel to accellrate dumping speed\n"
" --exec-pin-start Exec file map's pin start index\n"
+ " --use Use nft API instead of iptables cmd in network locking\n"
"\n"
"Check options:\n"
" Without options, \"criu check\" checks availability of absolutely required\n"
diff --git a/criu/include/cr_options.h b/criu/include/cr_options.h
index a64e977..6dadaba 100644
--- a/criu/include/cr_options.h
+++ b/criu/include/cr_options.h
@@ -203,6 +203,8 @@ struct cr_options {
int reserve_ports;
int parallel;
int exec_pin_start;
+ int use_nft;
+ int async_clear_nft;
};
extern struct cr_options opts;
--
2.34.1
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/cf-zhao/criu.git
git@gitee.com:cf-zhao/criu.git
cf-zhao
criu
criu
master

搜索帮助