Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 44929
b: refs/heads/master
c: 5c66870
h: refs/heads/master
i:
  44927: e160831
v: v3
  • Loading branch information
David S. Miller committed Dec 22, 2006
1 parent bc6ea1b commit e85017f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b23e3536667373e44f52a907f63cb55f75969490
refs/heads/master: 5c668704b7fa5a4ebf21a490ddfbd6dc2e01fc97
13 changes: 8 additions & 5 deletions trunk/net/ipv4/udp.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,11 +165,14 @@ int __udp_lib_get_port(struct sock *sk, unsigned short snum,
goto gotit;
}
size = 0;
sk_for_each(sk2, node, head)
if (++size < best_size_so_far) {
best_size_so_far = size;
best = result;
}
sk_for_each(sk2, node, head) {
if (++size >= best_size_so_far)
goto next;
}
best_size_so_far = size;
best = result;
next:
;
}
result = best;
for(i = 0; i < (1 << 16) / UDP_HTABLE_SIZE; i++, result += UDP_HTABLE_SIZE) {
Expand Down

0 comments on commit e85017f

Please sign in to comment.