diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-05-03 17:24:08 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-05-03 17:24:08 -0700 |
commit | 8800cea62025a5209d110c5fa5990429239d6eee (patch) | |
tree | 2aa9e4732d7014dcda4c0e80d2e377f52e2262e9 /net/ipv6/tcp_ipv6.c | |
parent | 84e48b6d64fdc29586bc7d9329f986cdae591a80 (diff) | |
parent | 14d50e78f947d340066ee0465dd892ad1d9162c0 (diff) |
Merge of rsync://rsync.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6.git/
Diffstat (limited to 'net/ipv6/tcp_ipv6.c')
-rw-r--r-- | net/ipv6/tcp_ipv6.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c index 4760c85e19d..0f69e800a0a 100644 --- a/net/ipv6/tcp_ipv6.c +++ b/net/ipv6/tcp_ipv6.c @@ -139,9 +139,12 @@ static int tcp_v6_get_port(struct sock *sk, unsigned short snum) int rover; spin_lock(&tcp_portalloc_lock); - rover = tcp_port_rover; + if (tcp_port_rover < low) + rover = low; + else + rover = tcp_port_rover; do { rover++; - if ((rover < low) || (rover > high)) + if (rover > high) rover = low; head = &tcp_bhash[tcp_bhashfn(rover)]; spin_lock(&head->lock); |