mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-04 09:59:32 +00:00
ipvs: Pass ipvs not net to ip_vs_genl_parse_service
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:
parent
af5403419d
commit
613fb830b7
1 changed files with 4 additions and 4 deletions
|
@ -3034,12 +3034,11 @@ static int ip_vs_genl_dump_services(struct sk_buff *skb,
|
|||
return skb->len;
|
||||
}
|
||||
|
||||
static int ip_vs_genl_parse_service(struct net *net,
|
||||
static int ip_vs_genl_parse_service(struct netns_ipvs *ipvs,
|
||||
struct ip_vs_service_user_kern *usvc,
|
||||
struct nlattr *nla, int full_entry,
|
||||
struct ip_vs_service **ret_svc)
|
||||
{
|
||||
struct netns_ipvs *ipvs = net_ipvs(net);
|
||||
struct nlattr *attrs[IPVS_SVC_ATTR_MAX + 1];
|
||||
struct nlattr *nla_af, *nla_port, *nla_fwmark, *nla_protocol, *nla_addr;
|
||||
struct ip_vs_service *svc;
|
||||
|
@ -3123,11 +3122,12 @@ static int ip_vs_genl_parse_service(struct net *net,
|
|||
static struct ip_vs_service *ip_vs_genl_find_service(struct net *net,
|
||||
struct nlattr *nla)
|
||||
{
|
||||
struct netns_ipvs *ipvs = net_ipvs(net);
|
||||
struct ip_vs_service_user_kern usvc;
|
||||
struct ip_vs_service *svc;
|
||||
int ret;
|
||||
|
||||
ret = ip_vs_genl_parse_service(net, &usvc, nla, 0, &svc);
|
||||
ret = ip_vs_genl_parse_service(ipvs, &usvc, nla, 0, &svc);
|
||||
return ret ? ERR_PTR(ret) : svc;
|
||||
}
|
||||
|
||||
|
@ -3538,7 +3538,7 @@ static int ip_vs_genl_set_cmd(struct sk_buff *skb, struct genl_info *info)
|
|||
if (cmd == IPVS_CMD_NEW_SERVICE || cmd == IPVS_CMD_SET_SERVICE)
|
||||
need_full_svc = 1;
|
||||
|
||||
ret = ip_vs_genl_parse_service(net, &usvc,
|
||||
ret = ip_vs_genl_parse_service(ipvs, &usvc,
|
||||
info->attrs[IPVS_CMD_ATTR_SERVICE],
|
||||
need_full_svc, &svc);
|
||||
if (ret)
|
||||
|
|
Loading…
Reference in a new issue