1 Star 0 Fork 18

yangl777/ebtables

forked from src-openEuler/ebtables 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
bugfix-Fix-ebt_print_error-for-prints-null.patch 1.93 KB
一键复制 编辑 原始数据 按行查看 历史
From c8fdd609e905bb2c472758ef6e324cbb43958b9d Mon Sep 17 00:00:00 2001
From: sunsuwan <sunsuwan3@huawei.com>
Date: Tue, 14 Jun 2022 09:45:56 +0800
Subject: [PATCH] fix ebt_print_error for prints null
---
ebtablesd.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/ebtablesd.c b/ebtablesd.c
index 02d51fa..930fc66 100644
--- a/ebtablesd.c
+++ b/ebtablesd.c
@@ -194,7 +194,7 @@ continue_read:
}
if (!(replace[i].flags & OPT_KERNELDATA)) {
ebt_print_error("ebtablesd: table %s has not "
- "been opened");
+ "been opened", argv[2]);
goto write_msg;
}
ebt_cleanup_replace(&replace[i]);
@@ -219,7 +219,7 @@ continue_read:
if (replace[i].flags & OPT_KERNELDATA) {
ebt_print_error("ebtablesd: table %s needs to "
"be freed before it can be "
- "opened");
+ "opened", argv[2]);
goto write_msg;
}
if (!ebt_get_kernel_table(&replace[i], 0)) {
@@ -248,7 +248,7 @@ continue_read:
if (replace[i].flags & OPT_KERNELDATA) {
ebt_print_error("ebtablesd: table %s needs to "
"be freed before it can be "
- "opened");
+ "opened", argv[2]);
goto write_msg;
}
tmp.filename = (char *)malloc(strlen(argv[3]) + 1);
@@ -296,7 +296,7 @@ continue_read:
}
if (!(replace[i].flags & OPT_KERNELDATA)) {
ebt_print_error("ebtablesd: table %s has not "
- "been opened");
+ "been opened", argv[2]);
goto write_msg;
}
/* The counters from the kernel are useless if we
@@ -324,7 +324,7 @@ continue_read:
}
if (!(replace[i].flags & OPT_KERNELDATA)) {
ebt_print_error("ebtablesd: table %s has not "
- "been opened");
+ "been opened", argv[2]);
goto write_msg;
}
replace[i].filename = (char *)malloc(strlen(argv[3]) + 1);
--
2.33.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/yangl777/ebtables.git
git@gitee.com:yangl777/ebtables.git
yangl777
ebtables
ebtables
master

搜索帮助