|
@@ -677,7 +677,7 @@ void ip_vs_tcp_conn_listen(struct net *net, struct ip_vs_conn *cp)
|
|
* timeouts is netns related now.
|
|
* timeouts is netns related now.
|
|
* ---------------------------------------------
|
|
* ---------------------------------------------
|
|
*/
|
|
*/
|
|
-static void __ip_vs_tcp_init(struct net *net, struct ip_vs_proto_data *pd)
|
|
|
|
|
|
+static int __ip_vs_tcp_init(struct net *net, struct ip_vs_proto_data *pd)
|
|
{
|
|
{
|
|
struct netns_ipvs *ipvs = net_ipvs(net);
|
|
struct netns_ipvs *ipvs = net_ipvs(net);
|
|
|
|
|
|
@@ -685,7 +685,10 @@ static void __ip_vs_tcp_init(struct net *net, struct ip_vs_proto_data *pd)
|
|
spin_lock_init(&ipvs->tcp_app_lock);
|
|
spin_lock_init(&ipvs->tcp_app_lock);
|
|
pd->timeout_table = ip_vs_create_timeout_table((int *)tcp_timeouts,
|
|
pd->timeout_table = ip_vs_create_timeout_table((int *)tcp_timeouts,
|
|
sizeof(tcp_timeouts));
|
|
sizeof(tcp_timeouts));
|
|
|
|
+ if (!pd->timeout_table)
|
|
|
|
+ return -ENOMEM;
|
|
pd->tcp_state_table = tcp_states;
|
|
pd->tcp_state_table = tcp_states;
|
|
|
|
+ return 0;
|
|
}
|
|
}
|
|
|
|
|
|
static void __ip_vs_tcp_exit(struct net *net, struct ip_vs_proto_data *pd)
|
|
static void __ip_vs_tcp_exit(struct net *net, struct ip_vs_proto_data *pd)
|