projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fae4f3c
)
tcp: ipv6: bind() use stronger condition for bind_conflict
author
Flavio Leitner
<fbl@redhat.com>
Tue, 5 Mar 2013 08:11:01 +0000
(08:11 +0000)
committer
David S. Miller
<davem@davemloft.net>
Wed, 6 Mar 2013 04:40:00 +0000
(23:40 -0500)
We must try harder to get unique (addr, port) pairs when
doing port autoselection for sockets with SO_REUSEADDR
option set.
This is a continuation of commit
aacd9289af8b82f5fb01bcdd53d0e3406d1333c7
for IPv6.
Signed-off-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/inet6_connection_sock.c
patch
|
blob
|
blame
|
history
diff --git
a/net/ipv6/inet6_connection_sock.c
b/net/ipv6/inet6_connection_sock.c
index 9bfab19ff3c02b301be08555b2c35a7982b2d1b6..5f25510f584ef8ce6462e3b2fd667dc2dc553471 100644
(file)
--- a/
net/ipv6/inet6_connection_sock.c
+++ b/
net/ipv6/inet6_connection_sock.c
@@
-54,6
+54,10
@@
int inet6_csk_bind_conflict(const struct sock *sk,
if (ipv6_rcv_saddr_equal(sk, sk2))
break;
}
+ if (!relax && reuse && sk2->sk_reuse &&
+ sk2->sk_state != TCP_LISTEN &&
+ ipv6_rcv_saddr_equal(sk, sk2))
+ break;
}
}