Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 90677
b: refs/heads/master
c: 7477fd2
h: refs/heads/master
i:
  90675: 7362c31
v: v3
  • Loading branch information
Pavel Emelyanov authored and David S. Miller committed Apr 14, 2008
1 parent 7654d77 commit 51ecb8d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 13f51d82acb003918d71ce4639ae77fceaa58cad
refs/heads/master: 7477fd2e6b676fcd15861c2a96a7172f71afe0a5
7 changes: 7 additions & 0 deletions trunk/net/ipv4/inet_connection_sock.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,13 @@ int inet_csk_bind_conflict(const struct sock *sk,
struct hlist_node *node;
int reuse = sk->sk_reuse;

/*
* Unlike other sk lookup places we do not check
* for sk_net here, since _all_ the socks listed
* in tb->owners list belong to the same net - the
* one this bucket belongs to.
*/

sk_for_each_bound(sk2, node, &tb->owners) {
if (sk != sk2 &&
!inet_v6_ipv6only(sk2) &&
Expand Down
4 changes: 4 additions & 0 deletions trunk/net/ipv6/inet6_connection_sock.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ int inet6_csk_bind_conflict(const struct sock *sk,
const struct hlist_node *node;

/* We must walk the whole port owner list in this case. -DaveM */
/*
* See comment in inet_csk_bind_conflict about sock lookup
* vs net namespaces issues.
*/
sk_for_each_bound(sk2, node, &tb->owners) {
if (sk != sk2 &&
(!sk->sk_bound_dev_if ||
Expand Down

0 comments on commit 51ecb8d

Please sign in to comment.