summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2006-07-03 19:32:23 -0700
committerDavid S. Miller <davem@davemloft.net>2006-07-03 19:32:23 -0700
commitd85838c55d836c33077344fab424f200f2827d84 (patch)
tree780dbeaa81b38b0edf3631f945b2ea9582dfe48e /net
parent18601a7d30c8340af4d786793ee52828471d2630 (diff)
downloadlinux-d85838c55d836c33077344fab424f200f2827d84.tar.gz
linux-d85838c55d836c33077344fab424f200f2827d84.tar.bz2
linux-d85838c55d836c33077344fab424f200f2827d84.zip
[ROSE]: Try all routes when establishing a ROSE connections.
From Jean-Paul F6FBB ROSE will only try to establish a route using the first route in its routing table. Fix to iterate through all additional routes if a connection attempt has failed. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/rose/af_rose.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/net/rose/af_rose.c b/net/rose/af_rose.c
index 7799fe82aeb6..d0a67bb31363 100644
--- a/net/rose/af_rose.c
+++ b/net/rose/af_rose.c
@@ -752,7 +752,7 @@ static int rose_connect(struct socket *sock, struct sockaddr *uaddr, int addr_le
rose_insert_socket(sk); /* Finish the bind */
}
-
+rose_try_next_neigh:
rose->dest_addr = addr->srose_addr;
rose->dest_call = addr->srose_call;
rose->rand = ((long)rose & 0xFFFF) + rose->lci;
@@ -810,6 +810,11 @@ static int rose_connect(struct socket *sock, struct sockaddr *uaddr, int addr_le
}
if (sk->sk_state != TCP_ESTABLISHED) {
+ /* Try next neighbour */
+ rose->neighbour = rose_get_neigh(&addr->srose_addr, &cause, &diagnostic);
+ if (rose->neighbour)
+ goto rose_try_next_neigh;
+ /* No more neighbour */
sock->state = SS_UNCONNECTED;
return sock_error(sk); /* Always set at this point */
}