diff options
Diffstat (limited to 'net/ipv4/ipvs/ip_vs_sync.c')
-rw-r--r-- | net/ipv4/ipvs/ip_vs_sync.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/net/ipv4/ipvs/ip_vs_sync.c b/net/ipv4/ipvs/ip_vs_sync.c index 356f067484e3..1960747f354c 100644 --- a/net/ipv4/ipvs/ip_vs_sync.c +++ b/net/ipv4/ipvs/ip_vs_sync.c | |||
@@ -387,7 +387,7 @@ static int set_mcast_if(struct sock *sk, char *ifname) | |||
387 | struct net_device *dev; | 387 | struct net_device *dev; |
388 | struct inet_sock *inet = inet_sk(sk); | 388 | struct inet_sock *inet = inet_sk(sk); |
389 | 389 | ||
390 | if ((dev = __dev_get_by_name(ifname)) == NULL) | 390 | if ((dev = __dev_get_by_name(&init_net, ifname)) == NULL) |
391 | return -ENODEV; | 391 | return -ENODEV; |
392 | 392 | ||
393 | if (sk->sk_bound_dev_if && dev->ifindex != sk->sk_bound_dev_if) | 393 | if (sk->sk_bound_dev_if && dev->ifindex != sk->sk_bound_dev_if) |
@@ -412,7 +412,7 @@ static int set_sync_mesg_maxlen(int sync_state) | |||
412 | int num; | 412 | int num; |
413 | 413 | ||
414 | if (sync_state == IP_VS_STATE_MASTER) { | 414 | if (sync_state == IP_VS_STATE_MASTER) { |
415 | if ((dev = __dev_get_by_name(ip_vs_master_mcast_ifn)) == NULL) | 415 | if ((dev = __dev_get_by_name(&init_net, ip_vs_master_mcast_ifn)) == NULL) |
416 | return -ENODEV; | 416 | return -ENODEV; |
417 | 417 | ||
418 | num = (dev->mtu - sizeof(struct iphdr) - | 418 | num = (dev->mtu - sizeof(struct iphdr) - |
@@ -423,7 +423,7 @@ static int set_sync_mesg_maxlen(int sync_state) | |||
423 | IP_VS_DBG(7, "setting the maximum length of sync sending " | 423 | IP_VS_DBG(7, "setting the maximum length of sync sending " |
424 | "message %d.\n", sync_send_mesg_maxlen); | 424 | "message %d.\n", sync_send_mesg_maxlen); |
425 | } else if (sync_state == IP_VS_STATE_BACKUP) { | 425 | } else if (sync_state == IP_VS_STATE_BACKUP) { |
426 | if ((dev = __dev_get_by_name(ip_vs_backup_mcast_ifn)) == NULL) | 426 | if ((dev = __dev_get_by_name(&init_net, ip_vs_backup_mcast_ifn)) == NULL) |
427 | return -ENODEV; | 427 | return -ENODEV; |
428 | 428 | ||
429 | sync_recv_mesg_maxlen = dev->mtu - | 429 | sync_recv_mesg_maxlen = dev->mtu - |
@@ -451,7 +451,7 @@ join_mcast_group(struct sock *sk, struct in_addr *addr, char *ifname) | |||
451 | memset(&mreq, 0, sizeof(mreq)); | 451 | memset(&mreq, 0, sizeof(mreq)); |
452 | memcpy(&mreq.imr_multiaddr, addr, sizeof(struct in_addr)); | 452 | memcpy(&mreq.imr_multiaddr, addr, sizeof(struct in_addr)); |
453 | 453 | ||
454 | if ((dev = __dev_get_by_name(ifname)) == NULL) | 454 | if ((dev = __dev_get_by_name(&init_net, ifname)) == NULL) |
455 | return -ENODEV; | 455 | return -ENODEV; |
456 | if (sk->sk_bound_dev_if && dev->ifindex != sk->sk_bound_dev_if) | 456 | if (sk->sk_bound_dev_if && dev->ifindex != sk->sk_bound_dev_if) |
457 | return -EINVAL; | 457 | return -EINVAL; |
@@ -472,7 +472,7 @@ static int bind_mcastif_addr(struct socket *sock, char *ifname) | |||
472 | __be32 addr; | 472 | __be32 addr; |
473 | struct sockaddr_in sin; | 473 | struct sockaddr_in sin; |
474 | 474 | ||
475 | if ((dev = __dev_get_by_name(ifname)) == NULL) | 475 | if ((dev = __dev_get_by_name(&init_net, ifname)) == NULL) |
476 | return -ENODEV; | 476 | return -ENODEV; |
477 | 477 | ||
478 | addr = inet_select_addr(dev, 0, RT_SCOPE_UNIVERSE); | 478 | addr = inet_select_addr(dev, 0, RT_SCOPE_UNIVERSE); |