summaryrefslogtreecommitdiffstats
path: root/drivers/block/drbd/drbd_receiver.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/block/drbd/drbd_receiver.c')
-rw-r--r--drivers/block/drbd/drbd_receiver.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c
index 1567e9b..26c30fd 100644
--- a/drivers/block/drbd/drbd_receiver.c
+++ b/drivers/block/drbd/drbd_receiver.c
@@ -949,20 +949,25 @@ retry:
if (sock.socket) {
conn_warn(tconn, "initial packet S crossed\n");
sock_release(sock.socket);
+ sock.socket = s;
+ goto randomize;
}
sock.socket = s;
break;
case P_INITIAL_META:
+ set_bit(DISCARD_CONCURRENT, &tconn->flags);
if (msock.socket) {
conn_warn(tconn, "initial packet M crossed\n");
sock_release(msock.socket);
+ msock.socket = s;
+ goto randomize;
}
msock.socket = s;
- set_bit(DISCARD_CONCURRENT, &tconn->flags);
break;
default:
conn_warn(tconn, "Error receiving initial packet\n");
sock_release(s);
+randomize:
if (random32() & 1)
goto retry;
}
OpenPOWER on IntegriCloud