Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
58bf2dbc
K
Kernel
项目概览
openeuler
/
Kernel
12 个月 前同步成功
通知
5
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
58bf2dbc
编写于
5月 27, 2011
作者:
D
David S. Miller
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'pablo/nf-2.6-updates' of
git://1984.lsi.us.es/net-2.6
上级
86e4ca66
c74c0bfe
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
38 addition
and
22 deletion
+38
-22
include/linux/netfilter/ipset/ip_set_ahash.h
include/linux/netfilter/ipset/ip_set_ahash.h
+2
-2
include/linux/netfilter/ipset/ip_set_timeout.h
include/linux/netfilter/ipset/ip_set_timeout.h
+10
-8
include/net/ip_vs.h
include/net/ip_vs.h
+2
-1
net/bridge/netfilter/ebtables.c
net/bridge/netfilter/ebtables.c
+4
-2
net/netfilter/ipset/ip_set_core.c
net/netfilter/ipset/ip_set_core.c
+1
-1
net/netfilter/ipvs/ip_vs_ftp.c
net/netfilter/ipvs/ip_vs_ftp.c
+19
-8
未找到文件。
include/linux/netfilter/ipset/ip_set_ahash.h
浏览文件 @
58bf2dbc
...
...
@@ -839,7 +839,7 @@ type_pf_tdel(struct ip_set *set, void *value, u32 timeout)
struct
htable
*
t
=
h
->
table
;
const
struct
type_pf_elem
*
d
=
value
;
struct
hbucket
*
n
;
int
i
,
ret
=
0
;
int
i
;
struct
type_pf_elem
*
data
;
u32
key
;
...
...
@@ -850,7 +850,7 @@ type_pf_tdel(struct ip_set *set, void *value, u32 timeout)
if
(
!
type_pf_data_equal
(
data
,
d
))
continue
;
if
(
type_pf_data_expired
(
data
))
ret
=
-
IPSET_ERR_EXIST
;
ret
urn
-
IPSET_ERR_EXIST
;
if
(
i
!=
n
->
pos
-
1
)
/* Not last one */
type_pf_data_copy
(
data
,
ahash_tdata
(
n
,
n
->
pos
-
1
));
...
...
include/linux/netfilter/ipset/ip_set_timeout.h
浏览文件 @
58bf2dbc
...
...
@@ -45,7 +45,7 @@ ip_set_timeout_test(unsigned long timeout)
{
return
timeout
!=
IPSET_ELEM_UNSET
&&
(
timeout
==
IPSET_ELEM_PERMANENT
||
time_
after
(
timeout
,
jiffies
));
time_
is_after_jiffies
(
timeout
));
}
static
inline
bool
...
...
@@ -53,7 +53,7 @@ ip_set_timeout_expired(unsigned long timeout)
{
return
timeout
!=
IPSET_ELEM_UNSET
&&
timeout
!=
IPSET_ELEM_PERMANENT
&&
time_
before
(
timeout
,
jiffies
);
time_
is_before_jiffies
(
timeout
);
}
static
inline
unsigned
long
...
...
@@ -64,7 +64,7 @@ ip_set_timeout_set(u32 timeout)
if
(
!
timeout
)
return
IPSET_ELEM_PERMANENT
;
t
=
timeout
*
HZ
+
jiffies
;
t
=
msecs_to_jiffies
(
timeout
*
1000
)
+
jiffies
;
if
(
t
==
IPSET_ELEM_UNSET
||
t
==
IPSET_ELEM_PERMANENT
)
/* Bingo! */
t
++
;
...
...
@@ -75,7 +75,8 @@ ip_set_timeout_set(u32 timeout)
static
inline
u32
ip_set_timeout_get
(
unsigned
long
timeout
)
{
return
timeout
==
IPSET_ELEM_PERMANENT
?
0
:
(
timeout
-
jiffies
)
/
HZ
;
return
timeout
==
IPSET_ELEM_PERMANENT
?
0
:
jiffies_to_msecs
(
timeout
-
jiffies
)
/
1000
;
}
#else
...
...
@@ -89,14 +90,14 @@ static inline bool
ip_set_timeout_test
(
unsigned
long
timeout
)
{
return
timeout
==
IPSET_ELEM_PERMANENT
||
time_
after
(
timeout
,
jiffies
);
time_
is_after_jiffies
(
timeout
);
}
static
inline
bool
ip_set_timeout_expired
(
unsigned
long
timeout
)
{
return
timeout
!=
IPSET_ELEM_PERMANENT
&&
time_
before
(
timeout
,
jiffies
);
time_
is_before_jiffies
(
timeout
);
}
static
inline
unsigned
long
...
...
@@ -107,7 +108,7 @@ ip_set_timeout_set(u32 timeout)
if
(
!
timeout
)
return
IPSET_ELEM_PERMANENT
;
t
=
timeout
*
HZ
+
jiffies
;
t
=
msecs_to_jiffies
(
timeout
*
1000
)
+
jiffies
;
if
(
t
==
IPSET_ELEM_PERMANENT
)
/* Bingo! :-) */
t
++
;
...
...
@@ -118,7 +119,8 @@ ip_set_timeout_set(u32 timeout)
static
inline
u32
ip_set_timeout_get
(
unsigned
long
timeout
)
{
return
timeout
==
IPSET_ELEM_PERMANENT
?
0
:
(
timeout
-
jiffies
)
/
HZ
;
return
timeout
==
IPSET_ELEM_PERMANENT
?
0
:
jiffies_to_msecs
(
timeout
-
jiffies
)
/
1000
;
}
#endif
/* ! IP_SET_BITMAP_TIMEOUT */
...
...
include/net/ip_vs.h
浏览文件 @
58bf2dbc
...
...
@@ -797,7 +797,8 @@ struct netns_ipvs {
struct
list_head
rs_table
[
IP_VS_RTAB_SIZE
];
/* ip_vs_app */
struct
list_head
app_list
;
/* ip_vs_ftp */
struct
ip_vs_app
*
ftp_app
;
/* ip_vs_proto */
#define IP_VS_PROTO_TAB_SIZE 32
/* must be power of 2 */
struct
ip_vs_proto_data
*
proto_data_table
[
IP_VS_PROTO_TAB_SIZE
];
...
...
net/bridge/netfilter/ebtables.c
浏览文件 @
58bf2dbc
...
...
@@ -1883,14 +1883,13 @@ static int compat_mtw_from_user(struct compat_ebt_entry_mwt *mwt,
struct
xt_target
*
wt
;
void
*
dst
=
NULL
;
int
off
,
pad
=
0
;
unsigned
int
size_kern
,
entry_offset
,
match_size
=
mwt
->
match_size
;
unsigned
int
size_kern
,
match_size
=
mwt
->
match_size
;
strlcpy
(
name
,
mwt
->
u
.
name
,
sizeof
(
name
));
if
(
state
->
buf_kern_start
)
dst
=
state
->
buf_kern_start
+
state
->
buf_kern_offset
;
entry_offset
=
(
unsigned
char
*
)
mwt
-
base
;
switch
(
compat_mwt
)
{
case
EBT_COMPAT_MATCH
:
match
=
try_then_request_module
(
xt_find_match
(
NFPROTO_BRIDGE
,
...
...
@@ -1933,6 +1932,9 @@ static int compat_mtw_from_user(struct compat_ebt_entry_mwt *mwt,
size_kern
=
wt
->
targetsize
;
module_put
(
wt
->
me
);
break
;
default:
return
-
EINVAL
;
}
state
->
buf_kern_offset
+=
match_size
+
off
;
...
...
net/netfilter/ipset/ip_set_core.c
浏览文件 @
58bf2dbc
...
...
@@ -815,7 +815,7 @@ ip_set_flush(struct sock *ctnl, struct sk_buff *skb,
ip_set_id_t
i
;
if
(
unlikely
(
protocol_failed
(
attr
)))
return
-
EPROTO
;
return
-
IPSET_ERR_PROTOCOL
;
if
(
!
attr
[
IPSET_ATTR_SETNAME
])
{
for
(
i
=
0
;
i
<
ip_set_max
;
i
++
)
...
...
net/netfilter/ipvs/ip_vs_ftp.c
浏览文件 @
58bf2dbc
...
...
@@ -411,25 +411,35 @@ static struct ip_vs_app ip_vs_ftp = {
static
int
__net_init
__ip_vs_ftp_init
(
struct
net
*
net
)
{
int
i
,
ret
;
struct
ip_vs_app
*
app
=
&
ip_vs_ftp
;
struct
ip_vs_app
*
app
;
struct
netns_ipvs
*
ipvs
=
net_ipvs
(
net
);
app
=
kmemdup
(
&
ip_vs_ftp
,
sizeof
(
struct
ip_vs_app
),
GFP_KERNEL
);
if
(
!
app
)
return
-
ENOMEM
;
INIT_LIST_HEAD
(
&
app
->
a_list
);
INIT_LIST_HEAD
(
&
app
->
incs_list
);
ipvs
->
ftp_app
=
app
;
ret
=
register_ip_vs_app
(
net
,
app
);
if
(
ret
)
return
re
t
;
goto
err_exi
t
;
for
(
i
=
0
;
i
<
IP_VS_APP_MAX_PORTS
;
i
++
)
{
if
(
!
ports
[
i
])
continue
;
ret
=
register_ip_vs_app_inc
(
net
,
app
,
app
->
protocol
,
ports
[
i
]);
if
(
ret
)
break
;
goto
err_unreg
;
pr_info
(
"%s: loaded support on port[%d] = %d
\n
"
,
app
->
name
,
i
,
ports
[
i
]);
}
return
0
;
if
(
ret
)
unregister_ip_vs_app
(
net
,
app
);
err_unreg:
unregister_ip_vs_app
(
net
,
app
);
err_exit:
kfree
(
ipvs
->
ftp_app
);
return
ret
;
}
/*
...
...
@@ -437,9 +447,10 @@ static int __net_init __ip_vs_ftp_init(struct net *net)
*/
static
void
__ip_vs_ftp_exit
(
struct
net
*
net
)
{
struct
ip_vs_app
*
app
=
&
ip_vs_ftp
;
struct
netns_ipvs
*
ipvs
=
net_ipvs
(
net
)
;
unregister_ip_vs_app
(
net
,
app
);
unregister_ip_vs_app
(
net
,
ipvs
->
ftp_app
);
kfree
(
ipvs
->
ftp_app
);
}
static
struct
pernet_operations
ip_vs_ftp_ops
=
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录