Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
619c1517
R
raspberrypi-kernel
项目概览
openeuler
/
raspberrypi-kernel
通知
13
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
raspberrypi-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
619c1517
编写于
6月 16, 2011
作者:
P
Patrick McHardy
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' of
git://git.kernel.org/pub/scm/linux/kernel/git/horms/ipvs-next-2.6
上级
1f2d9c9d
6c8f7949
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
100 addition
and
133 deletion
+100
-133
include/net/ip_vs.h
include/net/ip_vs.h
+13
-21
net/netfilter/ipvs/ip_vs_app.c
net/netfilter/ipvs/ip_vs_app.c
+2
-12
net/netfilter/ipvs/ip_vs_conn.c
net/netfilter/ipvs/ip_vs_conn.c
+2
-2
net/netfilter/ipvs/ip_vs_core.c
net/netfilter/ipvs/ip_vs_core.c
+25
-46
net/netfilter/ipvs/ip_vs_ctl.c
net/netfilter/ipvs/ip_vs_ctl.c
+14
-14
net/netfilter/ipvs/ip_vs_est.c
net/netfilter/ipvs/ip_vs_est.c
+2
-11
net/netfilter/ipvs/ip_vs_ftp.c
net/netfilter/ipvs/ip_vs_ftp.c
+38
-14
net/netfilter/ipvs/ip_vs_proto.c
net/netfilter/ipvs/ip_vs_proto.c
+2
-2
net/netfilter/ipvs/ip_vs_sync.c
net/netfilter/ipvs/ip_vs_sync.c
+2
-11
未找到文件。
include/net/ip_vs.h
浏览文件 @
619c1517
...
...
@@ -836,8 +836,6 @@ struct netns_ipvs {
int
num_services
;
/* no of virtual services */
rwlock_t
rs_lock
;
/* real services table */
/* semaphore for IPVS sockopts. And, [gs]etsockopt may sleep. */
struct
lock_class_key
ctl_key
;
/* ctl_mutex debuging */
/* Trash for destinations */
struct
list_head
dest_trash
;
/* Service counters */
...
...
@@ -1089,19 +1087,19 @@ ip_vs_control_add(struct ip_vs_conn *cp, struct ip_vs_conn *ctl_cp)
/*
* IPVS netns init & cleanup functions
*/
extern
int
__ip_vs_estimator
_init
(
struct
net
*
net
);
extern
int
__ip_vs_control
_init
(
struct
net
*
net
);
extern
int
__ip_vs_protocol
_init
(
struct
net
*
net
);
extern
int
__ip_vs_app
_init
(
struct
net
*
net
);
extern
int
__ip_vs_conn
_init
(
struct
net
*
net
);
extern
int
__ip_vs_sync
_init
(
struct
net
*
net
);
extern
void
__ip_vs_conn
_cleanup
(
struct
net
*
net
);
extern
void
__ip_vs_app
_cleanup
(
struct
net
*
net
);
extern
void
__ip_vs_protocol
_cleanup
(
struct
net
*
net
);
extern
void
__ip_vs_control
_cleanup
(
struct
net
*
net
);
extern
void
__ip_vs_estimator
_cleanup
(
struct
net
*
net
);
extern
void
__ip_vs_sync
_cleanup
(
struct
net
*
net
);
extern
void
__ip_vs_service
_cleanup
(
struct
net
*
net
);
extern
int
ip_vs_estimator_net
_init
(
struct
net
*
net
);
extern
int
ip_vs_control_net
_init
(
struct
net
*
net
);
extern
int
ip_vs_protocol_net
_init
(
struct
net
*
net
);
extern
int
ip_vs_app_net
_init
(
struct
net
*
net
);
extern
int
ip_vs_conn_net
_init
(
struct
net
*
net
);
extern
int
ip_vs_sync_net
_init
(
struct
net
*
net
);
extern
void
ip_vs_conn_net
_cleanup
(
struct
net
*
net
);
extern
void
ip_vs_app_net
_cleanup
(
struct
net
*
net
);
extern
void
ip_vs_protocol_net
_cleanup
(
struct
net
*
net
);
extern
void
ip_vs_control_net
_cleanup
(
struct
net
*
net
);
extern
void
ip_vs_estimator_net
_cleanup
(
struct
net
*
net
);
extern
void
ip_vs_sync_net
_cleanup
(
struct
net
*
net
);
extern
void
ip_vs_service_net
_cleanup
(
struct
net
*
net
);
/*
* IPVS application functions
...
...
@@ -1119,8 +1117,6 @@ extern void ip_vs_app_inc_put(struct ip_vs_app *inc);
extern
int
ip_vs_app_pkt_out
(
struct
ip_vs_conn
*
,
struct
sk_buff
*
skb
);
extern
int
ip_vs_app_pkt_in
(
struct
ip_vs_conn
*
,
struct
sk_buff
*
skb
);
extern
int
ip_vs_app_init
(
void
);
extern
void
ip_vs_app_cleanup
(
void
);
void
ip_vs_bind_pe
(
struct
ip_vs_service
*
svc
,
struct
ip_vs_pe
*
pe
);
void
ip_vs_unbind_pe
(
struct
ip_vs_service
*
svc
);
...
...
@@ -1223,15 +1219,11 @@ extern int start_sync_thread(struct net *net, int state, char *mcast_ifn,
__u8
syncid
);
extern
int
stop_sync_thread
(
struct
net
*
net
,
int
state
);
extern
void
ip_vs_sync_conn
(
struct
net
*
net
,
struct
ip_vs_conn
*
cp
);
extern
int
ip_vs_sync_init
(
void
);
extern
void
ip_vs_sync_cleanup
(
void
);
/*
* IPVS rate estimator prototypes (from ip_vs_est.c)
*/
extern
int
ip_vs_estimator_init
(
void
);
extern
void
ip_vs_estimator_cleanup
(
void
);
extern
void
ip_vs_start_estimator
(
struct
net
*
net
,
struct
ip_vs_stats
*
stats
);
extern
void
ip_vs_stop_estimator
(
struct
net
*
net
,
struct
ip_vs_stats
*
stats
);
extern
void
ip_vs_zero_estimator
(
struct
ip_vs_stats
*
stats
);
...
...
net/netfilter/ipvs/ip_vs_app.c
浏览文件 @
619c1517
...
...
@@ -576,7 +576,7 @@ static const struct file_operations ip_vs_app_fops = {
};
#endif
int
__net_init
__ip_vs_app
_init
(
struct
net
*
net
)
int
__net_init
ip_vs_app_net
_init
(
struct
net
*
net
)
{
struct
netns_ipvs
*
ipvs
=
net_ipvs
(
net
);
...
...
@@ -585,17 +585,7 @@ int __net_init __ip_vs_app_init(struct net *net)
return
0
;
}
void
__net_exit
__ip_vs_app
_cleanup
(
struct
net
*
net
)
void
__net_exit
ip_vs_app_net
_cleanup
(
struct
net
*
net
)
{
proc_net_remove
(
net
,
"ip_vs_app"
);
}
int
__init
ip_vs_app_init
(
void
)
{
return
0
;
}
void
ip_vs_app_cleanup
(
void
)
{
}
net/netfilter/ipvs/ip_vs_conn.c
浏览文件 @
619c1517
...
...
@@ -1247,7 +1247,7 @@ static void ip_vs_conn_flush(struct net *net)
/*
* per netns init and exit
*/
int
__net_init
__ip_vs_conn
_init
(
struct
net
*
net
)
int
__net_init
ip_vs_conn_net
_init
(
struct
net
*
net
)
{
struct
netns_ipvs
*
ipvs
=
net_ipvs
(
net
);
...
...
@@ -1258,7 +1258,7 @@ int __net_init __ip_vs_conn_init(struct net *net)
return
0
;
}
void
__net_exit
__ip_vs_conn
_cleanup
(
struct
net
*
net
)
void
__net_exit
ip_vs_conn_net
_cleanup
(
struct
net
*
net
)
{
/* flush all the connection entries first */
ip_vs_conn_flush
(
net
);
...
...
net/netfilter/ipvs/ip_vs_core.c
浏览文件 @
619c1517
...
...
@@ -1384,7 +1384,7 @@ ip_vs_in_icmp(struct sk_buff *skb, int *related, unsigned int hooknum)
offset
+=
2
*
sizeof
(
__u16
);
verdict
=
ip_vs_icmp_xmit
(
skb
,
cp
,
pp
,
offset
,
hooknum
);
out:
out:
__ip_vs_conn_put
(
cp
);
return
verdict
;
...
...
@@ -1891,22 +1891,22 @@ static int __net_init __ip_vs_init(struct net *net)
atomic_inc
(
&
ipvs_netns_cnt
);
net
->
ipvs
=
ipvs
;
if
(
__ip_vs_estimator
_init
(
net
)
<
0
)
if
(
ip_vs_estimator_net
_init
(
net
)
<
0
)
goto
estimator_fail
;
if
(
__ip_vs_control
_init
(
net
)
<
0
)
if
(
ip_vs_control_net
_init
(
net
)
<
0
)
goto
control_fail
;
if
(
__ip_vs_protocol
_init
(
net
)
<
0
)
if
(
ip_vs_protocol_net
_init
(
net
)
<
0
)
goto
protocol_fail
;
if
(
__ip_vs_app
_init
(
net
)
<
0
)
if
(
ip_vs_app_net
_init
(
net
)
<
0
)
goto
app_fail
;
if
(
__ip_vs_conn
_init
(
net
)
<
0
)
if
(
ip_vs_conn_net
_init
(
net
)
<
0
)
goto
conn_fail
;
if
(
__ip_vs_sync
_init
(
net
)
<
0
)
if
(
ip_vs_sync_net
_init
(
net
)
<
0
)
goto
sync_fail
;
printk
(
KERN_INFO
"IPVS: Creating netns size=%zu id=%d
\n
"
,
...
...
@@ -1917,27 +1917,27 @@ static int __net_init __ip_vs_init(struct net *net)
*/
sync_fail:
__ip_vs_conn
_cleanup
(
net
);
ip_vs_conn_net
_cleanup
(
net
);
conn_fail:
__ip_vs_app
_cleanup
(
net
);
ip_vs_app_net
_cleanup
(
net
);
app_fail:
__ip_vs_protocol
_cleanup
(
net
);
ip_vs_protocol_net
_cleanup
(
net
);
protocol_fail:
__ip_vs_control
_cleanup
(
net
);
ip_vs_control_net
_cleanup
(
net
);
control_fail:
__ip_vs_estimator
_cleanup
(
net
);
ip_vs_estimator_net
_cleanup
(
net
);
estimator_fail:
return
-
ENOMEM
;
}
static
void
__net_exit
__ip_vs_cleanup
(
struct
net
*
net
)
{
__ip_vs_service
_cleanup
(
net
);
/* ip_vs_flush() with locks */
__ip_vs_conn
_cleanup
(
net
);
__ip_vs_app
_cleanup
(
net
);
__ip_vs_protocol
_cleanup
(
net
);
__ip_vs_control
_cleanup
(
net
);
__ip_vs_estimator
_cleanup
(
net
);
ip_vs_service_net
_cleanup
(
net
);
/* ip_vs_flush() with locks */
ip_vs_conn_net
_cleanup
(
net
);
ip_vs_app_net
_cleanup
(
net
);
ip_vs_protocol_net
_cleanup
(
net
);
ip_vs_control_net
_cleanup
(
net
);
ip_vs_estimator_net
_cleanup
(
net
);
IP_VS_DBG
(
2
,
"ipvs netns %d released
\n
"
,
net_ipvs
(
net
)
->
gen
);
}
...
...
@@ -1945,7 +1945,7 @@ static void __net_exit __ip_vs_dev_cleanup(struct net *net)
{
EnterFunction
(
2
);
net_ipvs
(
net
)
->
enable
=
0
;
/* Disable packet reception */
__ip_vs_sync
_cleanup
(
net
);
ip_vs_sync_net
_cleanup
(
net
);
LeaveFunction
(
2
);
}
...
...
@@ -1967,36 +1967,23 @@ static int __init ip_vs_init(void)
{
int
ret
;
ip_vs_estimator_init
();
ret
=
ip_vs_control_init
();
if
(
ret
<
0
)
{
pr_err
(
"can't setup control.
\n
"
);
goto
cleanup_estimator
;
goto
exit
;
}
ip_vs_protocol_init
();
ret
=
ip_vs_app_init
();
if
(
ret
<
0
)
{
pr_err
(
"can't setup application helper.
\n
"
);
goto
cleanup_protocol
;
}
ret
=
ip_vs_conn_init
();
if
(
ret
<
0
)
{
pr_err
(
"can't setup connection table.
\n
"
);
goto
cleanup_app
;
}
ret
=
ip_vs_sync_init
();
if
(
ret
<
0
)
{
pr_err
(
"can't setup sync data.
\n
"
);
goto
cleanup_conn
;
goto
cleanup_protocol
;
}
ret
=
register_pernet_subsys
(
&
ipvs_core_ops
);
/* Alloc ip_vs struct */
if
(
ret
<
0
)
goto
cleanup_
sync
;
goto
cleanup_
conn
;
ret
=
register_pernet_device
(
&
ipvs_core_dev_ops
);
if
(
ret
<
0
)
...
...
@@ -2016,17 +2003,12 @@ static int __init ip_vs_init(void)
unregister_pernet_device
(
&
ipvs_core_dev_ops
);
cleanup_sub:
unregister_pernet_subsys
(
&
ipvs_core_ops
);
cleanup_sync:
ip_vs_sync_cleanup
();
cleanup_conn:
cleanup_conn:
ip_vs_conn_cleanup
();
cleanup_app:
ip_vs_app_cleanup
();
cleanup_protocol:
cleanup_protocol:
ip_vs_protocol_cleanup
();
ip_vs_control_cleanup
();
cleanup_estimator:
ip_vs_estimator_cleanup
();
exit:
return
ret
;
}
...
...
@@ -2035,12 +2017,9 @@ static void __exit ip_vs_cleanup(void)
nf_unregister_hooks
(
ip_vs_ops
,
ARRAY_SIZE
(
ip_vs_ops
));
unregister_pernet_device
(
&
ipvs_core_dev_ops
);
unregister_pernet_subsys
(
&
ipvs_core_ops
);
/* free ip_vs struct */
ip_vs_sync_cleanup
();
ip_vs_conn_cleanup
();
ip_vs_app_cleanup
();
ip_vs_protocol_cleanup
();
ip_vs_control_cleanup
();
ip_vs_estimator_cleanup
();
pr_info
(
"ipvs unloaded.
\n
"
);
}
...
...
net/netfilter/ipvs/ip_vs_ctl.c
浏览文件 @
619c1517
...
...
@@ -1334,9 +1334,9 @@ ip_vs_edit_service(struct ip_vs_service *svc, struct ip_vs_service_user_kern *u)
ip_vs_bind_pe
(
svc
,
pe
);
}
out_unlock:
out_unlock:
write_unlock_bh
(
&
__ip_vs_svc_lock
);
out:
out:
ip_vs_scheduler_put
(
old_sched
);
ip_vs_pe_put
(
old_pe
);
return
ret
;
...
...
@@ -1483,7 +1483,7 @@ static int ip_vs_flush(struct net *net)
* Delete service by {netns} in the service table.
* Called by __ip_vs_cleanup()
*/
void
__ip_vs_service
_cleanup
(
struct
net
*
net
)
void
ip_vs_service_net
_cleanup
(
struct
net
*
net
)
{
EnterFunction
(
2
);
/* Check for "full" addressed entries */
...
...
@@ -1662,7 +1662,7 @@ proc_do_sync_mode(ctl_table *table, int write,
/*
* IPVS sysctl table (under the /proc/sys/net/ipv4/vs/)
* Do not change order or insert new entries without
* align with netns init in
__ip_vs_control
_init()
* align with netns init in
ip_vs_control_net
_init()
*/
static
struct
ctl_table
vs_vars
[]
=
{
...
...
@@ -2469,7 +2469,7 @@ __ip_vs_get_service_entries(struct net *net,
count
++
;
}
}
out:
out:
return
ret
;
}
...
...
@@ -2707,7 +2707,7 @@ do_ip_vs_get_ctl(struct sock *sk, int cmd, void __user *user, int *len)
ret
=
-
EINVAL
;
}
out:
out:
mutex_unlock
(
&
__ip_vs_mutex
);
return
ret
;
}
...
...
@@ -3595,7 +3595,7 @@ static void ip_vs_genl_unregister(void)
* per netns intit/exit func.
*/
#ifdef CONFIG_SYSCTL
int
__net_init
__ip_vs_control
_init_sysctl
(
struct
net
*
net
)
int
__net_init
ip_vs_control_net
_init_sysctl
(
struct
net
*
net
)
{
int
idx
;
struct
netns_ipvs
*
ipvs
=
net_ipvs
(
net
);
...
...
@@ -3654,7 +3654,7 @@ int __net_init __ip_vs_control_init_sysctl(struct net *net)
return
0
;
}
void
__net_init
__ip_vs_control
_cleanup_sysctl
(
struct
net
*
net
)
void
__net_init
ip_vs_control_net
_cleanup_sysctl
(
struct
net
*
net
)
{
struct
netns_ipvs
*
ipvs
=
net_ipvs
(
net
);
...
...
@@ -3665,8 +3665,8 @@ void __net_init __ip_vs_control_cleanup_sysctl(struct net *net)
#else
int
__net_init
__ip_vs_control
_init_sysctl
(
struct
net
*
net
)
{
return
0
;
}
void
__net_init
__ip_vs_control
_cleanup_sysctl
(
struct
net
*
net
)
{
}
int
__net_init
ip_vs_control_net
_init_sysctl
(
struct
net
*
net
)
{
return
0
;
}
void
__net_init
ip_vs_control_net
_cleanup_sysctl
(
struct
net
*
net
)
{
}
#endif
...
...
@@ -3674,7 +3674,7 @@ static struct notifier_block ip_vs_dst_notifier = {
.
notifier_call
=
ip_vs_dst_event
,
};
int
__net_init
__ip_vs_control
_init
(
struct
net
*
net
)
int
__net_init
ip_vs_control_net
_init
(
struct
net
*
net
)
{
int
idx
;
struct
netns_ipvs
*
ipvs
=
net_ipvs
(
net
);
...
...
@@ -3702,7 +3702,7 @@ int __net_init __ip_vs_control_init(struct net *net)
proc_net_fops_create
(
net
,
"ip_vs_stats_percpu"
,
0
,
&
ip_vs_stats_percpu_fops
);
if
(
__ip_vs_control
_init_sysctl
(
net
))
if
(
ip_vs_control_net
_init_sysctl
(
net
))
goto
err
;
return
0
;
...
...
@@ -3712,13 +3712,13 @@ int __net_init __ip_vs_control_init(struct net *net)
return
-
ENOMEM
;
}
void
__net_exit
__ip_vs_control
_cleanup
(
struct
net
*
net
)
void
__net_exit
ip_vs_control_net
_cleanup
(
struct
net
*
net
)
{
struct
netns_ipvs
*
ipvs
=
net_ipvs
(
net
);
ip_vs_trash_cleanup
(
net
);
ip_vs_stop_estimator
(
net
,
&
ipvs
->
tot_stats
);
__ip_vs_control
_cleanup_sysctl
(
net
);
ip_vs_control_net
_cleanup_sysctl
(
net
);
proc_net_remove
(
net
,
"ip_vs_stats_percpu"
);
proc_net_remove
(
net
,
"ip_vs_stats"
);
proc_net_remove
(
net
,
"ip_vs"
);
...
...
net/netfilter/ipvs/ip_vs_est.c
浏览文件 @
619c1517
...
...
@@ -192,7 +192,7 @@ void ip_vs_read_estimator(struct ip_vs_stats_user *dst,
dst
->
outbps
=
(
e
->
outbps
+
0xF
)
>>
5
;
}
int
__net_init
__ip_vs_estimator
_init
(
struct
net
*
net
)
int
__net_init
ip_vs_estimator_net
_init
(
struct
net
*
net
)
{
struct
netns_ipvs
*
ipvs
=
net_ipvs
(
net
);
...
...
@@ -203,16 +203,7 @@ int __net_init __ip_vs_estimator_init(struct net *net)
return
0
;
}
void
__net_exit
__ip_vs_estimator
_cleanup
(
struct
net
*
net
)
void
__net_exit
ip_vs_estimator_net
_cleanup
(
struct
net
*
net
)
{
del_timer_sync
(
&
net_ipvs
(
net
)
->
est_timer
);
}
int
__init
ip_vs_estimator_init
(
void
)
{
return
0
;
}
void
ip_vs_estimator_cleanup
(
void
)
{
}
net/netfilter/ipvs/ip_vs_ftp.c
浏览文件 @
619c1517
...
...
@@ -44,8 +44,8 @@
#include <net/ip_vs.h>
#define SERVER_STRING "227
Entering Passive Mode (
"
#define CLIENT_STRING "PORT
"
#define SERVER_STRING "227 "
#define CLIENT_STRING "PORT"
/*
...
...
@@ -79,14 +79,17 @@ ip_vs_ftp_done_conn(struct ip_vs_app *app, struct ip_vs_conn *cp)
/*
* Get <addr,port> from the string "xxx.xxx.xxx.xxx,ppp,ppp", started
* with the "pattern" and terminated with the "term" character.
* with the "pattern", ignoring before "skip" and terminated with
* the "term" character.
* <addr,port> is in network order.
*/
static
int
ip_vs_ftp_get_addrport
(
char
*
data
,
char
*
data_limit
,
const
char
*
pattern
,
size_t
plen
,
char
term
,
const
char
*
pattern
,
size_t
plen
,
char
skip
,
char
term
,
__be32
*
addr
,
__be16
*
port
,
char
**
start
,
char
**
end
)
{
char
*
s
,
c
;
unsigned
char
p
[
6
];
int
i
=
0
;
...
...
@@ -101,19 +104,38 @@ static int ip_vs_ftp_get_addrport(char *data, char *data_limit,
if
(
strnicmp
(
data
,
pattern
,
plen
)
!=
0
)
{
return
0
;
}
*
start
=
data
+
plen
;
s
=
data
+
plen
;
if
(
skip
)
{
int
found
=
0
;
for
(;;
s
++
)
{
if
(
s
==
data_limit
)
return
-
1
;
if
(
!
found
)
{
if
(
*
s
==
skip
)
found
=
1
;
}
else
if
(
*
s
!=
skip
)
{
break
;
}
}
}
for
(
data
=
*
start
;
*
data
!=
term
;
data
++
)
{
for
(
data
=
s
;
;
data
++
)
{
if
(
data
==
data_limit
)
return
-
1
;
if
(
*
data
==
term
)
break
;
}
*
end
=
data
;
memset
(
p
,
0
,
sizeof
(
p
));
for
(
data
=
*
start
;
data
!=
*
end
;
data
++
)
{
if
(
*
data
>=
'0'
&&
*
data
<=
'9'
)
{
p
[
i
]
=
p
[
i
]
*
10
+
*
data
-
'0'
;
}
else
if
(
*
data
==
','
&&
i
<
5
)
{
for
(
data
=
s
;
;
data
++
)
{
c
=
*
data
;
if
(
c
==
term
)
break
;
if
(
c
>=
'0'
&&
c
<=
'9'
)
{
p
[
i
]
=
p
[
i
]
*
10
+
c
-
'0'
;
}
else
if
(
c
==
','
&&
i
<
5
)
{
i
++
;
}
else
{
/* unexpected character */
...
...
@@ -124,8 +146,9 @@ static int ip_vs_ftp_get_addrport(char *data, char *data_limit,
if
(
i
!=
5
)
return
-
1
;
*
addr
=
get_unaligned
((
__be32
*
)
p
);
*
port
=
get_unaligned
((
__be16
*
)(
p
+
4
));
*
start
=
s
;
*
addr
=
get_unaligned
((
__be32
*
)
p
);
*
port
=
get_unaligned
((
__be16
*
)
(
p
+
4
));
return
1
;
}
...
...
@@ -185,7 +208,8 @@ static int ip_vs_ftp_out(struct ip_vs_app *app, struct ip_vs_conn *cp,
if
(
ip_vs_ftp_get_addrport
(
data
,
data_limit
,
SERVER_STRING
,
sizeof
(
SERVER_STRING
)
-
1
,
')'
,
sizeof
(
SERVER_STRING
)
-
1
,
'('
,
')'
,
&
from
.
ip
,
&
port
,
&
start
,
&
end
)
!=
1
)
return
1
;
...
...
@@ -345,7 +369,7 @@ static int ip_vs_ftp_in(struct ip_vs_app *app, struct ip_vs_conn *cp,
*/
if
(
ip_vs_ftp_get_addrport
(
data_start
,
data_limit
,
CLIENT_STRING
,
sizeof
(
CLIENT_STRING
)
-
1
,
'\r'
,
&
to
.
ip
,
&
port
,
'
'
,
'
\r'
,
&
to
.
ip
,
&
port
,
&
start
,
&
end
)
!=
1
)
return
1
;
...
...
net/netfilter/ipvs/ip_vs_proto.c
浏览文件 @
619c1517
...
...
@@ -316,7 +316,7 @@ ip_vs_tcpudp_debug_packet(int af, struct ip_vs_protocol *pp,
/*
* per network name-space init
*/
int
__net_init
__ip_vs_protocol
_init
(
struct
net
*
net
)
int
__net_init
ip_vs_protocol_net
_init
(
struct
net
*
net
)
{
#ifdef CONFIG_IP_VS_PROTO_TCP
register_ip_vs_proto_netns
(
net
,
&
ip_vs_protocol_tcp
);
...
...
@@ -336,7 +336,7 @@ int __net_init __ip_vs_protocol_init(struct net *net)
return
0
;
}
void
__net_exit
__ip_vs_protocol
_cleanup
(
struct
net
*
net
)
void
__net_exit
ip_vs_protocol_net
_cleanup
(
struct
net
*
net
)
{
struct
netns_ipvs
*
ipvs
=
net_ipvs
(
net
);
struct
ip_vs_proto_data
*
pd
;
...
...
net/netfilter/ipvs/ip_vs_sync.c
浏览文件 @
619c1517
...
...
@@ -1663,7 +1663,7 @@ int stop_sync_thread(struct net *net, int state)
/*
* Initialize data struct for each netns
*/
int
__net_init
__ip_vs_sync
_init
(
struct
net
*
net
)
int
__net_init
ip_vs_sync_net
_init
(
struct
net
*
net
)
{
struct
netns_ipvs
*
ipvs
=
net_ipvs
(
net
);
...
...
@@ -1677,7 +1677,7 @@ int __net_init __ip_vs_sync_init(struct net *net)
return
0
;
}
void
__ip_vs_sync
_cleanup
(
struct
net
*
net
)
void
ip_vs_sync_net
_cleanup
(
struct
net
*
net
)
{
int
retc
;
...
...
@@ -1689,12 +1689,3 @@ void __ip_vs_sync_cleanup(struct net *net)
if
(
retc
&&
retc
!=
-
ESRCH
)
pr_err
(
"Failed to stop Backup Daemon
\n
"
);
}
int
__init
ip_vs_sync_init
(
void
)
{
return
0
;
}
void
ip_vs_sync_cleanup
(
void
)
{
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录