Skip to content

Commit

Permalink
ROSE: AX25: finding routes simplification
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Bernard Pidoux authored and David S. Miller committed Feb 14, 2011
1 parent c5d8b24 commit 68aa3fd
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions net/rose/af_rose.c
Original file line number Diff line number Diff line change
Expand Up @@ -803,7 +803,6 @@ 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;
Expand Down Expand Up @@ -865,12 +864,6 @@ 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, 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;
Expand Down

0 comments on commit 68aa3fd

Please sign in to comment.