summaryrefslogtreecommitdiff
path: root/net/ipv4/udp.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2016-05-10 17:06:04 +0300
committerTakashi Iwai <tiwai@suse.de>2016-05-10 17:06:04 +0300
commit2e00fde5c6ed8535244332ebb55e881baa54ae46 (patch)
treef578e02ef1dc6e59630f09404bb2f58500876811 /net/ipv4/udp.c
parent39f0ccde3624e7cf882faccf7f72a47b7a763bfb (diff)
parent3231e2053eaeee70bdfb216a78a30f11e88e2243 (diff)
downloadlinux-2e00fde5c6ed8535244332ebb55e881baa54ae46.tar.xz
Merge branch 'for-linus' into for-next
Diffstat (limited to 'net/ipv4/udp.c')
-rw-r--r--net/ipv4/udp.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
index 08eed5e16df0..a2e7f55a1f61 100644
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -339,8 +339,13 @@ found:
hslot2 = udp_hashslot2(udptable, udp_sk(sk)->udp_portaddr_hash);
spin_lock(&hslot2->lock);
- hlist_nulls_add_head_rcu(&udp_sk(sk)->udp_portaddr_node,
- &hslot2->head);
+ if (IS_ENABLED(CONFIG_IPV6) && sk->sk_reuseport &&
+ sk->sk_family == AF_INET6)
+ hlist_nulls_add_tail_rcu(&udp_sk(sk)->udp_portaddr_node,
+ &hslot2->head);
+ else
+ hlist_nulls_add_head_rcu(&udp_sk(sk)->udp_portaddr_node,
+ &hslot2->head);
hslot2->count++;
spin_unlock(&hslot2->lock);
}