Commit 68aa3fd551e9d54d98794852714dc1edbb21df77

Authored by Bernard Pidoux
Committed by David S. Miller
1 parent c5d8b24ad0

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>
Signed-off-by: David S. Miller <davem@davemloft.net>

Showing 1 changed file with 0 additions and 7 deletions Side-by-side Diff

... ... @@ -803,7 +803,6 @@
803 803  
804 804 rose_insert_socket(sk); /* Finish the bind */
805 805 }
806   -rose_try_next_neigh:
807 806 rose->dest_addr = addr->srose_addr;
808 807 rose->dest_call = addr->srose_call;
809 808 rose->rand = ((long)rose & 0xFFFF) + rose->lci;
... ... @@ -865,12 +864,6 @@
865 864 }
866 865  
867 866 if (sk->sk_state != TCP_ESTABLISHED) {
868   - /* Try next neighbour */
869   - rose->neighbour = rose_get_neigh(&addr->srose_addr, &cause, &diagnostic, 0);
870   - if (rose->neighbour)
871   - goto rose_try_next_neigh;
872   -
873   - /* No more neighbours */
874 867 sock->state = SS_UNCONNECTED;
875 868 err = sock_error(sk); /* Always set at this point */
876 869 goto out_release;