Commit fd124e2f authored by Eric W. Biederman's avatar Eric W. Biederman Committed by Simon Horman

ipvs: Pass ipvs not net to make_receive_sock

Signed-off-by: default avatar"Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: default avatarJulian Anastasov <ja@ssi.bg>
Signed-off-by: default avatarSimon Horman <horms@verge.net.au>
parent 68c76b6a
...@@ -1549,16 +1549,15 @@ static struct socket *make_send_sock(struct netns_ipvs *ipvs, int id) ...@@ -1549,16 +1549,15 @@ static struct socket *make_send_sock(struct netns_ipvs *ipvs, int id)
/* /*
* Set up receiving multicast socket over UDP * Set up receiving multicast socket over UDP
*/ */
static struct socket *make_receive_sock(struct net *net, int id) static struct socket *make_receive_sock(struct netns_ipvs *ipvs, int id)
{ {
struct netns_ipvs *ipvs = net_ipvs(net);
/* multicast addr */ /* multicast addr */
union ipvs_sockaddr mcast_addr; union ipvs_sockaddr mcast_addr;
struct socket *sock; struct socket *sock;
int result, salen; int result, salen;
/* First create a socket */ /* First create a socket */
result = sock_create_kern(net, ipvs->bcfg.mcast_af, SOCK_DGRAM, result = sock_create_kern(ipvs->net, ipvs->bcfg.mcast_af, SOCK_DGRAM,
IPPROTO_UDP, &sock); IPPROTO_UDP, &sock);
if (result < 0) { if (result < 0) {
pr_err("Error during creation of socket; terminating\n"); pr_err("Error during creation of socket; terminating\n");
...@@ -1873,7 +1872,7 @@ int start_sync_thread(struct netns_ipvs *ipvs, struct ipvs_sync_daemon_cfg *c, ...@@ -1873,7 +1872,7 @@ int start_sync_thread(struct netns_ipvs *ipvs, struct ipvs_sync_daemon_cfg *c,
if (state == IP_VS_STATE_MASTER) if (state == IP_VS_STATE_MASTER)
sock = make_send_sock(ipvs, id); sock = make_send_sock(ipvs, id);
else else
sock = make_receive_sock(ipvs->net, id); sock = make_receive_sock(ipvs, id);
if (IS_ERR(sock)) { if (IS_ERR(sock)) {
result = PTR_ERR(sock); result = PTR_ERR(sock);
goto outtinfo; goto outtinfo;
......
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