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-08 08:28:44 -08:00
2006-12-12 08:37:51 -08:00
2006-12-17 21:59:18 -08:00
2006-11-05 14:11:25 -08:00
2006-12-06 20:14:22 -08:00
2006-08-05 21:15:58 -07:00
2006-12-02 21:21:23 -08:00
2006-12-07 00:11:33 -08:00
2006-12-22 11:12:05 -08:00
2006-12-08 08:28:50 -08:00
2006-09-22 14:53:34 -07:00
2006-12-08 08:28:48 -08:00
2005-04-16 15:20:36 -07:00