ipvs: Store ipvs not net in struct ip_vs_conn_param
In practice struct netns_ipvs is as meaningful as struct net and more useful as it holds the ipvs specific data. So store a pointer to struct netns_ipvs. Update the accesses of param->net to access param->ipvs->net instead. When lookup up struct ip_vs_conn in a hash table replace comparisons of cp->net with comparisons of cp->ipvs which is possible now that ipvs is present in ip_vs_conn_param. 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>
This commit is contained in:
committed by
Simon Horman
parent
58dbc6f260
commit
e64e2b460c
@@ -545,7 +545,7 @@ struct ip_vs_proto_data *ip_vs_proto_data_get(struct net *net,
|
||||
unsigned short proto);
|
||||
|
||||
struct ip_vs_conn_param {
|
||||
struct net *net;
|
||||
struct netns_ipvs *ipvs;
|
||||
const union nf_inet_addr *caddr;
|
||||
const union nf_inet_addr *vaddr;
|
||||
__be16 cport;
|
||||
@@ -1208,7 +1208,7 @@ static inline void ip_vs_conn_fill_param(struct net *net, int af, int protocol,
|
||||
__be16 vport,
|
||||
struct ip_vs_conn_param *p)
|
||||
{
|
||||
p->net = net;
|
||||
p->ipvs = net_ipvs(net);
|
||||
p->af = af;
|
||||
p->protocol = protocol;
|
||||
p->caddr = caddr;
|
||||
|
||||
Reference in New Issue
Block a user