diff --git a/net/x25/af_x25.c b/net/x25/af_x25.c
index 27171ac6fe3b3be975dbca831f2453f637aa8e63..20a511398389d686383e9d8c74434b3f2ad40f3f 100644
--- a/net/x25/af_x25.c
+++ b/net/x25/af_x25.c
@@ -825,6 +825,7 @@ static int x25_connect(struct socket *sock, struct sockaddr *uaddr,
 		x25_neigh_put(x25->neighbour);
 		x25->neighbour = NULL;
 		read_unlock_bh(&x25_list_lock);
+		x25->state = X25_STATE_0;
 	}
 out_put_route:
 	x25_route_put(rt);