diff mbox

[ROSE] AX25 packet routing improvement

Message ID 4D596BC9.4030509@upmc.fr
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Bernard Pidoux Feb. 14, 2011, 5:52 p.m. UTC
Hi,

Here is a second try for this patch that completes the previous one.

[PATCH] [ROSE] [AX25] finding routes simplification

With previous patch, rose_get_neigh() routine
investigates the full list of neighbor nodes
until it finds or not an already connected node whether
it is called locally or through a level 3 transit frame.
If no routes are opened through an adjacent connected node
then a classical connect request is attempted.

Then there is no more reason for an extra loop such
as the one removed by this patch.

Signed-off-by: Bernard Pidoux <f6bvp@free.fr>

Comments

David Miller Feb. 14, 2011, 9:35 p.m. UTC | #1
From: Bernard Pidoux <bernard.pidoux@upmc.fr>
Date: Mon, 14 Feb 2011 18:52:09 +0100

> [PATCH] [ROSE] [AX25] finding routes simplification
> 
> With previous patch, rose_get_neigh() routine
> investigates the full list of neighbor nodes
> until it finds or not an already connected node whether
> it is called locally or through a level 3 transit frame.
> If no routes are opened through an adjacent connected node
> then a classical connect request is attempted.
> 
> Then there is no more reason for an extra loop such
> as the one removed by this patch.
> 
> Signed-off-by: Bernard Pidoux <f6bvp@free.fr>

Also applied to net-next-2.6, thanks!
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

--- a/net/rose/af_rose.c	2010-12-09 23:17:27.000000000 +0100
+++ b/net/rose/af_rose.c	2010-12-19 15:06:44.399455216 +0100
@@ -803,7 +803,6 @@ 
 
 		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;
@@ -865,12 +864,6 @@ 
 	}
 
 	if (sk->sk_state != TCP_ESTABLISHED) {
-	/* Try next neighbour */
-		rose->neighbour = rose_get_neigh(&addr->srose_addr, &cause, &diagnostic, 0);
-		if (rose->neighbour)
-			goto rose_try_next_neigh;
-
-		/* No more neighbours */
 		sock->state = SS_UNCONNECTED;
 		err = sock_error(sk);	/* Always set at this point */
 		goto out_release;