Commit 88fe2d37 authored by Hans Schillstrom's avatar Hans Schillstrom Committed by Simon Horman

IPVS: netns preparation for proto_ah_esp

In this phase (one), all local vars will be moved to ipvs struct.

Remaining work, add param struct net *net to a couple of
functions that common for all protos.
Signed-off-by: default avatarHans Schillstrom <hans.schillstrom@ericsson.com>
Acked-by: default avatarJulian Anastasov <ja@ssi.bg>
Signed-off-by: default avatarSimon Horman <horms@verge.net.au>
parent 9d934878
...@@ -315,6 +315,12 @@ static int __net_init __ip_vs_protocol_init(struct net *net) ...@@ -315,6 +315,12 @@ static int __net_init __ip_vs_protocol_init(struct net *net)
#endif #endif
#ifdef CONFIG_IP_VS_PROTO_SCTP #ifdef CONFIG_IP_VS_PROTO_SCTP
register_ip_vs_proto_netns(net, &ip_vs_protocol_sctp); register_ip_vs_proto_netns(net, &ip_vs_protocol_sctp);
#endif
#ifdef CONFIG_IP_VS_PROTO_AH
register_ip_vs_proto_netns(net, &ip_vs_protocol_ah);
#endif
#ifdef CONFIG_IP_VS_PROTO_ESP
register_ip_vs_proto_netns(net, &ip_vs_protocol_esp);
#endif #endif
return 0; return 0;
} }
......
...@@ -117,26 +117,14 @@ ah_esp_conn_schedule(int af, struct sk_buff *skb, struct ip_vs_protocol *pp, ...@@ -117,26 +117,14 @@ ah_esp_conn_schedule(int af, struct sk_buff *skb, struct ip_vs_protocol *pp,
return 0; return 0;
} }
static void ah_esp_init(struct ip_vs_protocol *pp)
{
/* nothing to do now */
}
static void ah_esp_exit(struct ip_vs_protocol *pp)
{
/* nothing to do now */
}
#ifdef CONFIG_IP_VS_PROTO_AH #ifdef CONFIG_IP_VS_PROTO_AH
struct ip_vs_protocol ip_vs_protocol_ah = { struct ip_vs_protocol ip_vs_protocol_ah = {
.name = "AH", .name = "AH",
.protocol = IPPROTO_AH, .protocol = IPPROTO_AH,
.num_states = 1, .num_states = 1,
.dont_defrag = 1, .dont_defrag = 1,
.init = ah_esp_init, .init = NULL,
.exit = ah_esp_exit, .exit = NULL,
.conn_schedule = ah_esp_conn_schedule, .conn_schedule = ah_esp_conn_schedule,
.conn_in_get = ah_esp_conn_in_get, .conn_in_get = ah_esp_conn_in_get,
.conn_out_get = ah_esp_conn_out_get, .conn_out_get = ah_esp_conn_out_get,
...@@ -159,8 +147,8 @@ struct ip_vs_protocol ip_vs_protocol_esp = { ...@@ -159,8 +147,8 @@ struct ip_vs_protocol ip_vs_protocol_esp = {
.protocol = IPPROTO_ESP, .protocol = IPPROTO_ESP,
.num_states = 1, .num_states = 1,
.dont_defrag = 1, .dont_defrag = 1,
.init = ah_esp_init, .init = NULL,
.exit = ah_esp_exit, .exit = NULL,
.conn_schedule = ah_esp_conn_schedule, .conn_schedule = ah_esp_conn_schedule,
.conn_in_get = ah_esp_conn_in_get, .conn_in_get = ah_esp_conn_in_get,
.conn_out_get = ah_esp_conn_out_get, .conn_out_get = ah_esp_conn_out_get,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment