Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 171179
b: refs/heads/master
c: 40c9c31
h: refs/heads/master
i:
  171177: 21a94af
  171175: a4f62b0
v: v3
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Nov 6, 2009
1 parent 9736143 commit f11c169
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 122ec6ffca3967ffaa96a4c7a5dc9cd71866e0bc
refs/heads/master: 40c9c31e388bfd513269df737f874d0cd53c1616
19 changes: 11 additions & 8 deletions trunk/net/sctp/ipv6.c
Original file line number Diff line number Diff line change
Expand Up @@ -837,15 +837,16 @@ static int sctp_inet6_bind_verify(struct sctp_sock *opt, union sctp_addr *addr)
if (type & IPV6_ADDR_LINKLOCAL) {
if (!addr->v6.sin6_scope_id)
return 0;
dev = dev_get_by_index(&init_net, addr->v6.sin6_scope_id);
if (!dev)
return 0;
if (!ipv6_chk_addr(&init_net, &addr->v6.sin6_addr,
rcu_read_lock();
dev = dev_get_by_index_rcu(&init_net,
addr->v6.sin6_scope_id);
if (!dev ||
!ipv6_chk_addr(&init_net, &addr->v6.sin6_addr,
dev, 0)) {
dev_put(dev);
rcu_read_unlock();
return 0;
}
dev_put(dev);
rcu_read_unlock();
} else if (type == IPV6_ADDR_MAPPED) {
if (!opt->v4mapped)
return 0;
Expand Down Expand Up @@ -873,10 +874,12 @@ static int sctp_inet6_send_verify(struct sctp_sock *opt, union sctp_addr *addr)
if (type & IPV6_ADDR_LINKLOCAL) {
if (!addr->v6.sin6_scope_id)
return 0;
dev = dev_get_by_index(&init_net, addr->v6.sin6_scope_id);
rcu_read_lock();
dev = dev_get_by_index_rcu(&init_net,
addr->v6.sin6_scope_id);
rcu_read_unlock();
if (!dev)
return 0;
dev_put(dev);
}
af = opt->pf->af;
}
Expand Down

0 comments on commit f11c169

Please sign in to comment.