David S. Miller 5c668704b7 [UDP]: Fix reversed logic in udp_get_port().
When this code was converted to use sk_for_each() the
logic for the "best hash chain length" code was reversed,
breaking everything.

The original code was of the form:

			size = 0;
			do {
				if (++size >= best_size_so_far)
					goto next;
			} while ((sk = sk->next) != NULL);
			best_size_so_far = size;
			best = result;
		next:;

and this got converted into:

			sk_for_each(sk2, node, head)
				if (++size < best_size_so_far) {
					best_size_so_far = size;
					best = result;
				}

Which does something very very different from the original.

Signed-off-by: David S. Miller <davem@davemloft.net>
2006-12-22 11:42:26 -08:00
..
2006-12-02 21:21:17 -08:00
2006-12-02 21:21:17 -08:00
2006-12-07 08:39:25 -08:00
2006-09-28 18:02:23 -07:00
2006-12-07 08:39:25 -08:00
2006-09-28 18:02:29 -07:00
2006-12-07 08:39:25 -08:00
2006-12-08 17:19:20 -08:00
2006-10-04 00:31:09 -07:00
2006-12-02 21:21:17 -08:00
2006-12-07 08:39:25 -08:00
2005-04-16 15:20:36 -07:00
2006-09-22 15:18:04 -07:00
2006-10-25 23:04:12 -07:00
2006-12-07 00:11:33 -08:00
2006-09-28 18:03:07 -07:00
2006-12-02 21:31:51 -08:00
2006-10-04 00:31:09 -07:00