aboutsummaryrefslogtreecommitdiff
path: root/fs/aio.c
diff options
context:
space:
mode:
authorEric Dumazet <dada1@cosmosbay.com>2008-10-08 11:44:17 -0700
committerDavid S. Miller <davem@davemloft.net>2008-10-08 11:44:17 -0700
commit9088c5609584684149f3fb5b065aa7f18dcb03ff (patch)
tree270a8d4d853825b7ff169b4153816372fca00ea1 /fs/aio.c
parent53e915034970935596703a6005cde27c2128b5c3 (diff)
udp: Improve port randomization
Current UDP port allocation is suboptimal. We select the shortest chain to chose a port (out of 512) that will hash in this shortest chain. First, it can lead to give not so ramdom ports and ease give attackers more opportunities to break the system. Second, it can consume a lot of CPU to scan all table in order to find the shortest chain. Third, in some pathological cases we can fail to find a free port even if they are plenty of them. This patch zap the search for a short chain and only use one random seed. Problem of getting long chains should be addressed in another way, since we can obtain long chains with non random ports. Based on a report and patch from Vitaly Mayatskikh Signed-off-by: Eric Dumazet <dada1@cosmosbay.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'fs/aio.c')
0 files changed, 0 insertions, 0 deletions