Skip to contentSkip to conversation

Try all routes when establishing a ROSE connections.

ROSE Applied Ralf Baechle 2 participants 2 messages Jun 30, 2006 – Jul 4, 2006

Subsystems (2)
lore
Share & tools
lore
#0 lore raw
Quoted 1 line

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.

---
 net/rose/af_rose.c |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
net/rose/af_rose.c +6 -1
Index: linux-net/net/rose/af_rose.c
===================================================================
@@ -753,7 +753,7 @@ static int rose_connect(struct socket *s
 
 		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;
@@ -811,6 +811,11 @@ static int rose_connect(struct socket *s
 	}
 
 	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 */
 	}
maintainer Applied
#1 lore raw

From: Ralf Baechle <[email protected]>
Date: Fri, 30 Jun 2006 14:53:16 +0100

Quoted 7 lines
Quoted 1 line

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.

Applied, thanks.