diff options
Diffstat (limited to 'net/ipv4/udp.c')
-rw-r--r-- | net/ipv4/udp.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index ef4d901ee9a..cb9fc58efb2 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c | |||
@@ -147,11 +147,11 @@ int __udp_lib_get_port(struct sock *sk, unsigned short snum, | |||
147 | write_lock_bh(&udp_hash_lock); | 147 | write_lock_bh(&udp_hash_lock); |
148 | 148 | ||
149 | if (!snum) { | 149 | if (!snum) { |
150 | int i; | 150 | int i, low, high; |
151 | int low = sysctl_local_port_range[0]; | ||
152 | int high = sysctl_local_port_range[1]; | ||
153 | unsigned rover, best, best_size_so_far; | 151 | unsigned rover, best, best_size_so_far; |
154 | 152 | ||
153 | inet_get_local_port_range(&low, &high); | ||
154 | |||
155 | best_size_so_far = UINT_MAX; | 155 | best_size_so_far = UINT_MAX; |
156 | best = rover = net_random() % (high - low) + low; | 156 | best = rover = net_random() % (high - low) + low; |
157 | 157 | ||