aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pobox.com>2005-10-05 02:11:33 -0400
committerJeff Garzik <jgarzik@pobox.com>2005-10-05 02:11:33 -0400
commit0d69ae5fb7eb9ba3b54cf0ba4ef5ae591f31eef7 (patch)
treebe441bfa1e76035c00b66a3b06fea66cfd63d594 /net/ipv6
parent13d1ef29bc5125d7b77c5f6cdfde5ed31226005c (diff)
parent9bc39bec87ee3e35897fe27441e979e7c208f624 (diff)
Merge branch 'master'
Diffstat (limited to 'net/ipv6')
-rw-r--r--net/ipv6/udp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c
index e4cad11f284a..bf9519341fd3 100644
--- a/net/ipv6/udp.c
+++ b/net/ipv6/udp.c
@@ -99,7 +99,7 @@ static int udp_v6_get_port(struct sock *sk, unsigned short snum)
99 next:; 99 next:;
100 } 100 }
101 result = best; 101 result = best;
102 for(;; result += UDP_HTABLE_SIZE) { 102 for(i = 0; i < (1 << 16) / UDP_HTABLE_SIZE; i++, result += UDP_HTABLE_SIZE) {
103 if (result > sysctl_local_port_range[1]) 103 if (result > sysctl_local_port_range[1])
104 result = sysctl_local_port_range[0] 104 result = sysctl_local_port_range[0]
105 + ((result - sysctl_local_port_range[0]) & 105 + ((result - sysctl_local_port_range[0]) &
@@ -107,6 +107,8 @@ static int udp_v6_get_port(struct sock *sk, unsigned short snum)
107 if (!udp_lport_inuse(result)) 107 if (!udp_lport_inuse(result))
108 break; 108 break;
109 } 109 }
110 if (i >= (1 << 16) / UDP_HTABLE_SIZE)
111 goto fail;
110gotit: 112gotit:
111 udp_port_rover = snum = result; 113 udp_port_rover = snum = result;
112 } else { 114 } else {