Commit fd124e2f8bb2ff94a1547a8f1d9741e7ffef1bbb

Authored by Eric W. Biederman
Committed by Simon Horman
1 parent 68c76b6aa0

ipvs: Pass ipvs not net to make_receive_sock

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 3 additions and 4 deletions Side-by-side Diff

net/netfilter/ipvs/ip_vs_sync.c
... ... @@ -1549,16 +1549,15 @@
1549 1549 /*
1550 1550 * Set up receiving multicast socket over UDP
1551 1551 */
1552   -static struct socket *make_receive_sock(struct net *net, int id)
  1552 +static struct socket *make_receive_sock(struct netns_ipvs *ipvs, int id)
1553 1553 {
1554   - struct netns_ipvs *ipvs = net_ipvs(net);
1555 1554 /* multicast addr */
1556 1555 union ipvs_sockaddr mcast_addr;
1557 1556 struct socket *sock;
1558 1557 int result, salen;
1559 1558  
1560 1559 /* First create a socket */
1561   - result = sock_create_kern(net, ipvs->bcfg.mcast_af, SOCK_DGRAM,
  1560 + result = sock_create_kern(ipvs->net, ipvs->bcfg.mcast_af, SOCK_DGRAM,
1562 1561 IPPROTO_UDP, &sock);
1563 1562 if (result < 0) {
1564 1563 pr_err("Error during creation of socket; terminating\n");
... ... @@ -1873,7 +1872,7 @@
1873 1872 if (state == IP_VS_STATE_MASTER)
1874 1873 sock = make_send_sock(ipvs, id);
1875 1874 else
1876   - sock = make_receive_sock(ipvs->net, id);
  1875 + sock = make_receive_sock(ipvs, id);
1877 1876 if (IS_ERR(sock)) {
1878 1877 result = PTR_ERR(sock);
1879 1878 goto outtinfo;