Commit 4f30665bac73cba452fe49f97c51e663b9fec34c

Authored by Eric W. Biederman
Committed by Simon Horman
1 parent b61a8c1a40

ipvs: Pass ipvs not net to ip_vs_proc_conn

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>

Showing 1 changed file with 6 additions and 6 deletions Side-by-side Diff

net/netfilter/ipvs/ip_vs_sync.c
... ... @@ -835,7 +835,7 @@
835 835 * Param: ...
836 836 * timeout is in sec.
837 837 */
838   -static void ip_vs_proc_conn(struct net *net, struct ip_vs_conn_param *param,
  838 +static void ip_vs_proc_conn(struct netns_ipvs *ipvs, struct ip_vs_conn_param *param,
839 839 unsigned int flags, unsigned int state,
840 840 unsigned int protocol, unsigned int type,
841 841 const union nf_inet_addr *daddr, __be16 dport,
... ... @@ -844,7 +844,6 @@
844 844 {
845 845 struct ip_vs_dest *dest;
846 846 struct ip_vs_conn *cp;
847   - struct netns_ipvs *ipvs = net_ipvs(net);
848 847  
849 848 if (!(flags & IP_VS_CONN_F_TEMPLATE)) {
850 849 cp = ip_vs_conn_in_get(param);
... ... @@ -1014,7 +1013,7 @@
1014 1013 s->vport, &param);
1015 1014  
1016 1015 /* Send timeout as Zero */
1017   - ip_vs_proc_conn(ipvs->net, &param, flags, state, s->protocol, AF_INET,
  1016 + ip_vs_proc_conn(ipvs, &param, flags, state, s->protocol, AF_INET,
1018 1017 (union nf_inet_addr *)&s->daddr, s->dport,
1019 1018 0, 0, opt);
1020 1019 }
... ... @@ -1067,6 +1066,7 @@
1067 1066 */
1068 1067 static inline int ip_vs_proc_sync_conn(struct net *net, __u8 *p, __u8 *msg_end)
1069 1068 {
  1069 + struct netns_ipvs *ipvs = net_ipvs(net);
1070 1070 struct ip_vs_sync_conn_options opt;
1071 1071 union ip_vs_sync_conn *s;
1072 1072 struct ip_vs_protocol *pp;
1073 1073  
1074 1074  
... ... @@ -1169,21 +1169,21 @@
1169 1169 state = 0;
1170 1170 }
1171 1171 }
1172   - if (ip_vs_conn_fill_param_sync(net_ipvs(net), af, s, &param, pe_data,
  1172 + if (ip_vs_conn_fill_param_sync(ipvs, af, s, &param, pe_data,
1173 1173 pe_data_len, pe_name, pe_name_len)) {
1174 1174 retc = 50;
1175 1175 goto out;
1176 1176 }
1177 1177 /* If only IPv4, just silent skip IPv6 */
1178 1178 if (af == AF_INET)
1179   - ip_vs_proc_conn(net, &param, flags, state, s->v4.protocol, af,
  1179 + ip_vs_proc_conn(ipvs, &param, flags, state, s->v4.protocol, af,
1180 1180 (union nf_inet_addr *)&s->v4.daddr, s->v4.dport,
1181 1181 ntohl(s->v4.timeout), ntohl(s->v4.fwmark),
1182 1182 (opt_flags & IPVS_OPT_F_SEQ_DATA ? &opt : NULL)
1183 1183 );
1184 1184 #ifdef CONFIG_IP_VS_IPV6
1185 1185 else
1186   - ip_vs_proc_conn(net, &param, flags, state, s->v6.protocol, af,
  1186 + ip_vs_proc_conn(ipvs, &param, flags, state, s->v6.protocol, af,
1187 1187 (union nf_inet_addr *)&s->v6.daddr, s->v6.dport,
1188 1188 ntohl(s->v6.timeout), ntohl(s->v6.fwmark),
1189 1189 (opt_flags & IPVS_OPT_F_SEQ_DATA ? &opt : NULL)