Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
ad6d9503
K
Kernel
项目概览
openeuler
/
Kernel
1 年多 前同步成功
通知
8
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
ad6d9503
编写于
9年前
作者:
P
Pablo Neira Ayuso
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
netfilter: nf_ct_helper: define pr_fmt()
Signed-off-by:
N
Pablo Neira Ayuso
<
pablo@netfilter.org
>
上级
39e6dea2
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
28 addition
and
27 deletion
+28
-27
net/netfilter/nf_conntrack_ftp.c
net/netfilter/nf_conntrack_ftp.c
+8
-9
net/netfilter/nf_conntrack_irc.c
net/netfilter/nf_conntrack_irc.c
+4
-3
net/netfilter/nf_conntrack_sane.c
net/netfilter/nf_conntrack_sane.c
+9
-10
net/netfilter/nf_conntrack_sip.c
net/netfilter/nf_conntrack_sip.c
+3
-2
net/netfilter/nf_conntrack_tftp.c
net/netfilter/nf_conntrack_tftp.c
+4
-3
未找到文件。
net/netfilter/nf_conntrack_ftp.c
浏览文件 @
ad6d9503
...
...
@@ -10,6 +10,8 @@
* published by the Free Software Foundation.
*/
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/netfilter.h>
...
...
@@ -505,11 +507,11 @@ static int help(struct sk_buff *skb,
different IP address. Simply don't record it for
NAT. */
if
(
cmd
.
l3num
==
PF_INET
)
{
pr_debug
(
"
conntrack_ftp:
NOT RECORDING: %pI4 != %pI4
\n
"
,
pr_debug
(
"NOT RECORDING: %pI4 != %pI4
\n
"
,
&
cmd
.
u3
.
ip
,
&
ct
->
tuplehash
[
dir
].
tuple
.
src
.
u3
.
ip
);
}
else
{
pr_debug
(
"
conntrack_ftp:
NOT RECORDING: %pI6 != %pI6
\n
"
,
pr_debug
(
"NOT RECORDING: %pI6 != %pI6
\n
"
,
cmd
.
u3
.
ip6
,
ct
->
tuplehash
[
dir
].
tuple
.
src
.
u3
.
ip6
);
}
...
...
@@ -586,8 +588,7 @@ static void nf_conntrack_ftp_fini(void)
if
(
ftp
[
i
][
j
].
me
==
NULL
)
continue
;
pr_debug
(
"nf_ct_ftp: unregistering helper for pf: %d "
"port: %d
\n
"
,
pr_debug
(
"unregistering helper for pf: %d port: %d
\n
"
,
ftp
[
i
][
j
].
tuple
.
src
.
l3num
,
ports
[
i
]);
nf_conntrack_helper_unregister
(
&
ftp
[
i
][
j
]);
}
...
...
@@ -625,14 +626,12 @@ static int __init nf_conntrack_ftp_init(void)
else
sprintf
(
ftp
[
i
][
j
].
name
,
"ftp-%d"
,
ports
[
i
]);
pr_debug
(
"nf_ct_ftp: registering helper for pf: %d "
"port: %d
\n
"
,
pr_debug
(
"registering helper for pf: %d port: %d
\n
"
,
ftp
[
i
][
j
].
tuple
.
src
.
l3num
,
ports
[
i
]);
ret
=
nf_conntrack_helper_register
(
&
ftp
[
i
][
j
]);
if
(
ret
)
{
printk
(
KERN_ERR
"nf_ct_ftp: failed to register"
" helper for pf: %d port: %d
\n
"
,
ftp
[
i
][
j
].
tuple
.
src
.
l3num
,
ports
[
i
]);
pr_err
(
"failed to register helper for pf: %d port: %d
\n
"
,
ftp
[
i
][
j
].
tuple
.
src
.
l3num
,
ports
[
i
]);
nf_conntrack_ftp_fini
();
return
ret
;
}
...
...
This diff is collapsed.
Click to expand it.
net/netfilter/nf_conntrack_irc.c
浏览文件 @
ad6d9503
...
...
@@ -9,6 +9,8 @@
* 2 of the License, or (at your option) any later version.
*/
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/skbuff.h>
...
...
@@ -237,7 +239,7 @@ static int __init nf_conntrack_irc_init(void)
int
i
,
ret
;
if
(
max_dcc_channels
<
1
)
{
pr
intk
(
KERN_ERR
"nf_ct_irc:
max_dcc_channels must not be zero
\n
"
);
pr
_err
(
"
max_dcc_channels must not be zero
\n
"
);
return
-
EINVAL
;
}
...
...
@@ -267,8 +269,7 @@ static int __init nf_conntrack_irc_init(void)
ret
=
nf_conntrack_helper_register
(
&
irc
[
i
]);
if
(
ret
)
{
printk
(
KERN_ERR
"nf_ct_irc: failed to register helper "
"for pf: %u port: %u
\n
"
,
pr_err
(
"failed to register helper for pf: %u port: %u
\n
"
,
irc
[
i
].
tuple
.
src
.
l3num
,
ports
[
i
]);
nf_conntrack_irc_fini
();
return
ret
;
...
...
This diff is collapsed.
Click to expand it.
net/netfilter/nf_conntrack_sane.c
浏览文件 @
ad6d9503
...
...
@@ -17,6 +17,8 @@
* published by the Free Software Foundation.
*/
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/netfilter.h>
...
...
@@ -120,14 +122,14 @@ static int help(struct sk_buff *skb,
ct_sane_info
->
state
=
SANE_STATE_NORMAL
;
if
(
datalen
<
sizeof
(
struct
sane_reply_net_start
))
{
pr_debug
(
"
nf_ct_sane:
NET_START reply too short
\n
"
);
pr_debug
(
"NET_START reply too short
\n
"
);
goto
out
;
}
reply
=
sb_ptr
;
if
(
reply
->
status
!=
htonl
(
SANE_STATUS_SUCCESS
))
{
/* saned refused the command */
pr_debug
(
"
nf_ct_sane:
unsuccessful SANE_STATUS = %u
\n
"
,
pr_debug
(
"unsuccessful SANE_STATUS = %u
\n
"
,
ntohl
(
reply
->
status
));
goto
out
;
}
...
...
@@ -148,7 +150,7 @@ static int help(struct sk_buff *skb,
&
tuple
->
src
.
u3
,
&
tuple
->
dst
.
u3
,
IPPROTO_TCP
,
NULL
,
&
reply
->
port
);
pr_debug
(
"
nf_ct_sane:
expect: "
);
pr_debug
(
"expect: "
);
nf_ct_dump_tuple
(
&
exp
->
tuple
);
/* Can't expect this? Best to drop packet now. */
...
...
@@ -178,8 +180,7 @@ static void nf_conntrack_sane_fini(void)
for
(
i
=
0
;
i
<
ports_c
;
i
++
)
{
for
(
j
=
0
;
j
<
2
;
j
++
)
{
pr_debug
(
"nf_ct_sane: unregistering helper for pf: %d "
"port: %d
\n
"
,
pr_debug
(
"unregistering helper for pf: %d port: %d
\n
"
,
sane
[
i
][
j
].
tuple
.
src
.
l3num
,
ports
[
i
]);
nf_conntrack_helper_unregister
(
&
sane
[
i
][
j
]);
}
...
...
@@ -216,14 +217,12 @@ static int __init nf_conntrack_sane_init(void)
else
sprintf
(
sane
[
i
][
j
].
name
,
"sane-%d"
,
ports
[
i
]);
pr_debug
(
"nf_ct_sane: registering helper for pf: %d "
"port: %d
\n
"
,
pr_debug
(
"registering helper for pf: %d port: %d
\n
"
,
sane
[
i
][
j
].
tuple
.
src
.
l3num
,
ports
[
i
]);
ret
=
nf_conntrack_helper_register
(
&
sane
[
i
][
j
]);
if
(
ret
)
{
printk
(
KERN_ERR
"nf_ct_sane: failed to "
"register helper for pf: %d port: %d
\n
"
,
sane
[
i
][
j
].
tuple
.
src
.
l3num
,
ports
[
i
]);
pr_err
(
"failed to register helper for pf: %d port: %d
\n
"
,
sane
[
i
][
j
].
tuple
.
src
.
l3num
,
ports
[
i
]);
nf_conntrack_sane_fini
();
return
ret
;
}
...
...
This diff is collapsed.
Click to expand it.
net/netfilter/nf_conntrack_sip.c
浏览文件 @
ad6d9503
...
...
@@ -10,6 +10,8 @@
* published by the Free Software Foundation.
*/
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/module.h>
#include <linux/ctype.h>
#include <linux/skbuff.h>
...
...
@@ -1665,8 +1667,7 @@ static int __init nf_conntrack_sip_init(void)
ret
=
nf_conntrack_helper_register
(
&
sip
[
i
][
j
]);
if
(
ret
)
{
printk
(
KERN_ERR
"nf_ct_sip: failed to register"
" helper for pf: %u port: %u
\n
"
,
pr_err
(
"failed to register helper for pf: %u port: %u
\n
"
,
sip
[
i
][
j
].
tuple
.
src
.
l3num
,
ports
[
i
]);
nf_conntrack_sip_fini
();
return
ret
;
...
...
This diff is collapsed.
Click to expand it.
net/netfilter/nf_conntrack_tftp.c
浏览文件 @
ad6d9503
...
...
@@ -5,6 +5,8 @@
* published by the Free Software Foundation.
*/
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/in.h>
...
...
@@ -138,9 +140,8 @@ static int __init nf_conntrack_tftp_init(void)
ret
=
nf_conntrack_helper_register
(
&
tftp
[
i
][
j
]);
if
(
ret
)
{
printk
(
KERN_ERR
"nf_ct_tftp: failed to register"
" helper for pf: %u port: %u
\n
"
,
tftp
[
i
][
j
].
tuple
.
src
.
l3num
,
ports
[
i
]);
pr_err
(
"failed to register helper for pf: %u port: %u
\n
"
,
tftp
[
i
][
j
].
tuple
.
src
.
l3num
,
ports
[
i
]);
nf_conntrack_tftp_fini
();
return
ret
;
}
...
...
This diff is collapsed.
Click to expand it.
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录
新手
引导
客服
返回
顶部