aboutsummaryrefslogtreecommitdiffstats
path: root/net/sctp/ipv6.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sctp/ipv6.c')
-rw-r--r--net/sctp/ipv6.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/sctp/ipv6.c b/net/sctp/ipv6.c
index ddeb4882ec75..9de3ddaa2768 100644
--- a/net/sctp/ipv6.c
+++ b/net/sctp/ipv6.c
@@ -855,7 +855,7 @@ static int sctp_inet6_bind_verify(struct sctp_sock *opt, union sctp_addr *addr)
855 if (type & IPV6_ADDR_LINKLOCAL) { 855 if (type & IPV6_ADDR_LINKLOCAL) {
856 if (!addr->v6.sin6_scope_id) 856 if (!addr->v6.sin6_scope_id)
857 return 0; 857 return 0;
858 dev = dev_get_by_index(addr->v6.sin6_scope_id); 858 dev = dev_get_by_index(&init_net, addr->v6.sin6_scope_id);
859 if (!dev) 859 if (!dev)
860 return 0; 860 return 0;
861 if (!ipv6_chk_addr(&addr->v6.sin6_addr, dev, 0)) { 861 if (!ipv6_chk_addr(&addr->v6.sin6_addr, dev, 0)) {
@@ -886,7 +886,7 @@ static int sctp_inet6_send_verify(struct sctp_sock *opt, union sctp_addr *addr)
886 if (type & IPV6_ADDR_LINKLOCAL) { 886 if (type & IPV6_ADDR_LINKLOCAL) {
887 if (!addr->v6.sin6_scope_id) 887 if (!addr->v6.sin6_scope_id)
888 return 0; 888 return 0;
889 dev = dev_get_by_index(addr->v6.sin6_scope_id); 889 dev = dev_get_by_index(&init_net, addr->v6.sin6_scope_id);
890 if (!dev) 890 if (!dev)
891 return 0; 891 return 0;
892 dev_put(dev); 892 dev_put(dev);