summaryrefslogtreecommitdiffstats
path: root/drivers/block/drbd/drbd_receiver.c
diff options
context:
space:
mode:
authorAndreas Gruenbacher2011-03-21 14:10:15 +0100
committerPhilipp Reisner2012-11-08 16:44:51 +0100
commit0916e0e308716387f16462f66b53c9128587fd0b (patch)
treee220018d0b28b983b21ff0ab8b4abd1912795f1c /drivers/block/drbd/drbd_receiver.c
parentdrbd: drbd_connected(): Return an error code upon failure. (diff)
downloadkernel-qcow2-linux-0916e0e308716387f16462f66b53c9128587fd0b.tar.gz
kernel-qcow2-linux-0916e0e308716387f16462f66b53c9128587fd0b.tar.xz
kernel-qcow2-linux-0916e0e308716387f16462f66b53c9128587fd0b.zip
drbd: Always use the same protocol version for the same peer
There is no need to send protocol 80 headers to peers that understand protocol 95 headers. Make sure that we don't send protocol 95 headers until we have agreed upon a protocol version with our peer, though. Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Diffstat (limited to 'drivers/block/drbd/drbd_receiver.c')
-rw-r--r--drivers/block/drbd/drbd_receiver.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c
index 6a3e628b68c6..27d4a4520641 100644
--- a/drivers/block/drbd/drbd_receiver.c
+++ b/drivers/block/drbd/drbd_receiver.c
@@ -819,9 +819,9 @@ static int drbd_connect(struct drbd_tconn *tconn)
return -2;
clear_bit(DISCARD_CONCURRENT, &tconn->flags);
- tconn->agreed_pro_version = 99;
- /* agreed_pro_version must be smaller than 100 so we send the old
- header (h80) in the first packet and in the handshake packet. */
+
+ /* Assume that the peer only understands protocol 80 until we know better. */
+ tconn->agreed_pro_version = 80;
sock = NULL;
msock = NULL;