diff options
Diffstat (limited to 'net/ipv4/udp.c')
-rw-r--r-- | net/ipv4/udp.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index 185ed3e59802..d92f94b7e402 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c | |||
@@ -1861,6 +1861,10 @@ static struct sock *__udp4_lib_mcast_demux_lookup(struct net *net, | |||
1861 | unsigned int count, slot = udp_hashfn(net, hnum, udp_table.mask); | 1861 | unsigned int count, slot = udp_hashfn(net, hnum, udp_table.mask); |
1862 | struct udp_hslot *hslot = &udp_table.hash[slot]; | 1862 | struct udp_hslot *hslot = &udp_table.hash[slot]; |
1863 | 1863 | ||
1864 | /* Do not bother scanning a too big list */ | ||
1865 | if (hslot->count > 10) | ||
1866 | return NULL; | ||
1867 | |||
1864 | rcu_read_lock(); | 1868 | rcu_read_lock(); |
1865 | begin: | 1869 | begin: |
1866 | count = 0; | 1870 | count = 0; |