Skip to content

Commit 68aa3fd

Browse files
f6bvpdavem330
authored andcommitted
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent c5d8b24 commit 68aa3fd

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

net/rose/af_rose.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -803,7 +803,6 @@ static int rose_connect(struct socket *sock, struct sockaddr *uaddr, int addr_le
803803

804804
rose_insert_socket(sk); /* Finish the bind */
805805
}
806-
rose_try_next_neigh:
807806
rose->dest_addr = addr->srose_addr;
808807
rose->dest_call = addr->srose_call;
809808
rose->rand = ((long)rose & 0xFFFF) + rose->lci;
@@ -865,12 +864,6 @@ static int rose_connect(struct socket *sock, struct sockaddr *uaddr, int addr_le
865864
}
866865

867866
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 */
874867
sock->state = SS_UNCONNECTED;
875868
err = sock_error(sk); /* Always set at this point */
876869
goto out_release;

0 commit comments

Comments
 (0)