aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/drbd/drbd_nl.c
diff options
context:
space:
mode:
authorPhilipp Reisner <philipp.reisner@linbit.com>2011-05-16 11:38:45 -0400
committerPhilipp Reisner <philipp.reisner@linbit.com>2012-11-08 10:55:54 -0500
commitd659f2aaea1bd2fe9cf68b33d881470678c6ce2b (patch)
treebab1455003b41a0005c29ae3d6b82b1c94803117 /drivers/block/drbd/drbd_nl.c
parent036b17eaab935541835f4cc1fcbfe62ead5faa55 (diff)
drbd: Send PROTOCOL_UPDATE packets when appropriate
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_nl.c')
-rw-r--r--drivers/block/drbd/drbd_nl.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/block/drbd/drbd_nl.c b/drivers/block/drbd/drbd_nl.c
index 133a6724657d..b81f924c47bc 100644
--- a/drivers/block/drbd/drbd_nl.c
+++ b/drivers/block/drbd/drbd_nl.c
@@ -1866,7 +1866,6 @@ int drbd_adm_net_opts(struct sk_buff *skb, struct genl_info *info)
1866 int ovr; /* online verify running */ 1866 int ovr; /* online verify running */
1867 int rsr; /* re-sync running */ 1867 int rsr; /* re-sync running */
1868 struct crypto crypto = { }; 1868 struct crypto crypto = { };
1869 bool change_integrity_alg;
1870 1869
1871 retcode = drbd_adm_prepare(skb, info, DRBD_ADM_NEED_CONN); 1870 retcode = drbd_adm_prepare(skb, info, DRBD_ADM_NEED_CONN);
1872 if (!adm_ctx.reply_skb) 1871 if (!adm_ctx.reply_skb)
@@ -1923,9 +1922,6 @@ int drbd_adm_net_opts(struct sk_buff *skb, struct genl_info *info)
1923 goto fail; 1922 goto fail;
1924 } 1923 }
1925 1924
1926 change_integrity_alg = strcmp(old_conf->integrity_alg,
1927 new_conf->integrity_alg);
1928
1929 retcode = alloc_crypto(&crypto, new_conf); 1925 retcode = alloc_crypto(&crypto, new_conf);
1930 if (retcode != NO_ERROR) 1926 if (retcode != NO_ERROR)
1931 goto fail; 1927 goto fail;
@@ -1949,13 +1945,10 @@ int drbd_adm_net_opts(struct sk_buff *skb, struct genl_info *info)
1949 tconn->int_dig_vv = crypto.int_dig_vv; 1945 tconn->int_dig_vv = crypto.int_dig_vv;
1950 crypto_free_hash(tconn->integrity_tfm); 1946 crypto_free_hash(tconn->integrity_tfm);
1951 tconn->integrity_tfm = crypto.integrity_tfm; 1947 tconn->integrity_tfm = crypto.integrity_tfm;
1952 if (change_integrity_alg) { 1948 if (tconn->cstate >= C_WF_REPORT_PARAMS && tconn->agreed_pro_version >= 100)
1953 /* Do this without trying to take tconn->data.mutex again. */ 1949 /* Do this without trying to take tconn->data.mutex again. */
1954 if (__drbd_send_protocol(tconn)) 1950 __drbd_send_protocol(tconn, P_PROTOCOL_UPDATE);
1955 goto fail;
1956 }
1957 1951
1958 /* FIXME Changing cram_hmac while the connection is established is useless */
1959 crypto_free_hash(tconn->cram_hmac_tfm); 1952 crypto_free_hash(tconn->cram_hmac_tfm);
1960 tconn->cram_hmac_tfm = crypto.cram_hmac_tfm; 1953 tconn->cram_hmac_tfm = crypto.cram_hmac_tfm;
1961 1954