aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Schillstrom <hans.schillstrom@ericsson.com>2011-01-03 08:44:50 -0500
committerSimon Horman <horms@verge.net.au>2011-01-12 20:30:27 -0500
commit88fe2d372793a71ae4f6319a16f537d56a83906c (patch)
treed935214bda3e3ff059a9896a6fbfbfbb0345f9c8
parent9d934878e7870fbbbd8eaed2e467552536877def (diff)
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: Hans Schillstrom <hans.schillstrom@ericsson.com> Acked-by: Julian Anastasov <ja@ssi.bg> Signed-off-by: Simon Horman <horms@verge.net.au>
-rw-r--r--net/netfilter/ipvs/ip_vs_proto.c6
-rw-r--r--net/netfilter/ipvs/ip_vs_proto_ah_esp.c20
2 files changed, 10 insertions, 16 deletions
diff --git a/net/netfilter/ipvs/ip_vs_proto.c b/net/netfilter/ipvs/ip_vs_proto.c
index 001b2f825043..9f609d4d5d58 100644
--- a/net/netfilter/ipvs/ip_vs_proto.c
+++ b/net/netfilter/ipvs/ip_vs_proto.c
@@ -316,6 +316,12 @@ static int __net_init __ip_vs_protocol_init(struct net *net)
316#ifdef CONFIG_IP_VS_PROTO_SCTP 316#ifdef CONFIG_IP_VS_PROTO_SCTP
317 register_ip_vs_proto_netns(net, &ip_vs_protocol_sctp); 317 register_ip_vs_proto_netns(net, &ip_vs_protocol_sctp);
318#endif 318#endif
319#ifdef CONFIG_IP_VS_PROTO_AH
320 register_ip_vs_proto_netns(net, &ip_vs_protocol_ah);
321#endif
322#ifdef CONFIG_IP_VS_PROTO_ESP
323 register_ip_vs_proto_netns(net, &ip_vs_protocol_esp);
324#endif
319 return 0; 325 return 0;
320} 326}
321 327
diff --git a/net/netfilter/ipvs/ip_vs_proto_ah_esp.c b/net/netfilter/ipvs/ip_vs_proto_ah_esp.c
index 3a0461117d3f..b8b37fafc988 100644
--- a/net/netfilter/ipvs/ip_vs_proto_ah_esp.c
+++ b/net/netfilter/ipvs/ip_vs_proto_ah_esp.c
@@ -117,26 +117,14 @@ ah_esp_conn_schedule(int af, struct sk_buff *skb, struct ip_vs_protocol *pp,
117 return 0; 117 return 0;
118} 118}
119 119
120static void ah_esp_init(struct ip_vs_protocol *pp)
121{
122 /* nothing to do now */
123}
124
125
126static void ah_esp_exit(struct ip_vs_protocol *pp)
127{
128 /* nothing to do now */
129}
130
131
132#ifdef CONFIG_IP_VS_PROTO_AH 120#ifdef CONFIG_IP_VS_PROTO_AH
133struct ip_vs_protocol ip_vs_protocol_ah = { 121struct ip_vs_protocol ip_vs_protocol_ah = {
134 .name = "AH", 122 .name = "AH",
135 .protocol = IPPROTO_AH, 123 .protocol = IPPROTO_AH,
136 .num_states = 1, 124 .num_states = 1,
137 .dont_defrag = 1, 125 .dont_defrag = 1,
138 .init = ah_esp_init, 126 .init = NULL,
139 .exit = ah_esp_exit, 127 .exit = NULL,
140 .conn_schedule = ah_esp_conn_schedule, 128 .conn_schedule = ah_esp_conn_schedule,
141 .conn_in_get = ah_esp_conn_in_get, 129 .conn_in_get = ah_esp_conn_in_get,
142 .conn_out_get = ah_esp_conn_out_get, 130 .conn_out_get = ah_esp_conn_out_get,
@@ -159,8 +147,8 @@ struct ip_vs_protocol ip_vs_protocol_esp = {
159 .protocol = IPPROTO_ESP, 147 .protocol = IPPROTO_ESP,
160 .num_states = 1, 148 .num_states = 1,
161 .dont_defrag = 1, 149 .dont_defrag = 1,
162 .init = ah_esp_init, 150 .init = NULL,
163 .exit = ah_esp_exit, 151 .exit = NULL,
164 .conn_schedule = ah_esp_conn_schedule, 152 .conn_schedule = ah_esp_conn_schedule,
165 .conn_in_get = ah_esp_conn_in_get, 153 .conn_in_get = ah_esp_conn_in_get,
166 .conn_out_get = ah_esp_conn_out_get, 154 .conn_out_get = ah_esp_conn_out_get,