Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
9b29b2a2
L
libvirt
项目概览
openeuler
/
libvirt
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
L
libvirt
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
9b29b2a2
编写于
1月 10, 2008
作者:
M
Mark McLoughlin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Like --with-iptables-prefix, --with-iptables-dir is no
longer useful, so let's remove it.
上级
f8e0674a
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
18 addition
and
35 deletion
+18
-35
ChangeLog
ChangeLog
+7
-0
configure.in
configure.in
+0
-12
src/iptables.c
src/iptables.c
+11
-23
未找到文件。
ChangeLog
浏览文件 @
9b29b2a2
Thu Jan 10 13:56:33 GMT 2008 Mark McLoughlin <markmc@redhat.com>
Like --with-iptables-prefix, --with-iptables-dir is no
longer useful, so let's remove it.
* configure.in, src/iptables.c: remove --with-iptables-dir
Thu Jan 10 13:54:10 GMT 2008 Mark McLoughlin <markmc@redhat.com>
--with-iptables-prefix was added to integrate with
...
...
configure.in
浏览文件 @
9b29b2a2
...
...
@@ -182,18 +182,6 @@ fi
AM_CONDITIONAL(LIBVIRT_INIT_SCRIPTS_RED_HAT, test x$with_init_scripts = xredhat)
AC_MSG_RESULT($with_init_scripts)
dnl
dnl also support saving the various chains to files
dnl in e.g. /etc/sysconfig/iptables.d
dnl
AC_ARG_WITH(iptables-dir,
AC_HELP_STRING([--with-iptables-dir=path],
[directory used to save iptables chains, defaults to not saving]),
[IPTABLES_DIR=$withval])
if test x"$IPTABLES_DIR" != "x"; then
AC_DEFINE_UNQUOTED(IPTABLES_DIR, "$IPTABLES_DIR", [directory used for saving iptables chains])
fi
dnl
dnl ensure that Fedora's system-config-firewall knows
dnl about libvirt's iptables rules
...
...
src/iptables.c
浏览文件 @
9b29b2a2
...
...
@@ -48,11 +48,6 @@
#define qemudLog(level, msg...) fprintf(stderr, msg)
#ifdef ENABLE_IPTABLES_LOKKIT
#undef IPTABLES_DIR
#define IPTABLES_DIR LOCAL_STATE_DIR "/lib/libvirt/iptables"
#endif
enum
{
ADD
=
0
,
REMOVE
...
...
@@ -73,12 +68,12 @@ typedef struct
int
nrules
;
iptRule
*
rules
;
#ifdef
IPTABLES_DIR
#ifdef
ENABLE_IPTABLES_LOKKIT
char
dir
[
PATH_MAX
];
char
path
[
PATH_MAX
];
#endif
/*
IPTABLES_DIR
*/
#endif
/*
ENABLE_IPTABLES_LOKKIT
*/
}
iptRules
;
...
...
@@ -89,7 +84,6 @@ struct _iptablesContext
iptRules
*
nat_postrouting
;
};
#ifdef IPTABLES_DIR
#ifdef ENABLE_IPTABLES_LOKKIT
static
void
notifyRulesUpdated
(
const
char
*
table
,
...
...
@@ -189,7 +183,6 @@ notifyRulesRemoved(const char *table,
#undef MAX_FILE_LEN
}
#endif
/* ENABLE_IPTABLES_LOKKIT */
static
int
writeRules
(
const
char
*
path
,
...
...
@@ -237,7 +230,7 @@ writeRules(const char *path,
return
0
;
}
#endif
/*
IPTABLES_DIR
*/
#endif
/*
ENABLE_IPTABLES_LOKKIT
*/
static
void
iptRuleFree
(
iptRule
*
rule
)
...
...
@@ -279,7 +272,7 @@ iptRulesAppend(iptRules *rules,
rules
->
nrules
++
;
#ifdef
IPTABLES_DIR
#ifdef
ENABLE_IPTABLES_LOKKIT
{
int
err
;
...
...
@@ -290,12 +283,9 @@ iptRulesAppend(iptRules *rules,
return
err
;
}
#ifdef ENABLE_IPTABLES_LOKKIT
notifyRulesUpdated
(
rules
->
table
,
rules
->
path
);
#endif
/* ENABLE_IPTABLES_LOKKIT */
#endif
/* IPTABLES_DIR */
return
0
;
}
...
...
@@ -320,7 +310,7 @@ iptRulesRemove(iptRules *rules,
rules
->
nrules
--
;
#ifdef
IPTABLES_DIR
#ifdef
ENABLE_IPTABLES_LOKKIT
{
int
err
;
...
...
@@ -328,15 +318,12 @@ iptRulesRemove(iptRules *rules,
return
err
;
}
#ifdef ENABLE_IPTABLES_LOKKIT
if
(
rules
->
nrules
>
0
)
notifyRulesUpdated
(
rules
->
table
,
rules
->
path
);
else
notifyRulesRemoved
(
rules
->
table
,
rules
->
path
);
#endif
/* ENABLE_IPTABLES_LOKKIT */
#endif
/* IPTABLES_DIR */
return
0
;
}
...
...
@@ -366,10 +353,10 @@ iptRulesFree(iptRules *rules)
rules
->
nrules
=
0
;
}
#ifdef
IPTABLES_DIR
#ifdef
ENABLE_IPTABLES_LOKKIT
rules
->
dir
[
0
]
=
'\0'
;
rules
->
path
[
0
]
=
'\0'
;
#endif
/*
IPTABLES_DIR
*/
#endif
/*
ENABLE_IPTABLES_LOKKIT
*/
free
(
rules
);
}
...
...
@@ -392,13 +379,14 @@ iptRulesNew(const char *table,
rules
->
rules
=
NULL
;
rules
->
nrules
=
0
;
#ifdef IPTABLES_DIR
if
(
virFileBuildPath
(
IPTABLES_DIR
,
table
,
NULL
,
rules
->
dir
,
sizeof
(
rules
->
dir
))
<
0
)
#ifdef ENABLE_IPTABLES_LOKKIT
if
(
virFileBuildPath
(
LOCAL_STATE_DIR
"/lib/libvirt/iptables"
,
table
,
NULL
,
rules
->
dir
,
sizeof
(
rules
->
dir
))
<
0
)
goto
error
;
if
(
virFileBuildPath
(
rules
->
dir
,
chain
,
".chain"
,
rules
->
path
,
sizeof
(
rules
->
path
))
<
0
)
goto
error
;
#endif
/*
IPTABLES_DIR
*/
#endif
/*
ENABLE_IPTABLES_LOKKIT
*/
return
rules
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录