Lines Matching refs:new_net_conf
2239 …s(struct drbd_connection *connection, struct net_conf *old_net_conf, struct net_conf *new_net_conf) in _check_net_options() argument
2245 if (new_net_conf->wire_protocol != old_net_conf->wire_protocol) in _check_net_options()
2248 if (new_net_conf->two_primaries != old_net_conf->two_primaries) in _check_net_options()
2251 if (strcmp(new_net_conf->integrity_alg, old_net_conf->integrity_alg)) in _check_net_options()
2255 if (!new_net_conf->two_primaries && in _check_net_options()
2260 if (new_net_conf->two_primaries && in _check_net_options()
2261 (new_net_conf->wire_protocol != DRBD_PROT_C)) in _check_net_options()
2269 if (new_net_conf->wire_protocol == DRBD_PROT_A && fp == FP_STONITH) in _check_net_options()
2272 if (device->state.role == R_PRIMARY && new_net_conf->discard_my_data) in _check_net_options()
2276 if (new_net_conf->on_congestion != OC_BLOCK && new_net_conf->wire_protocol != DRBD_PROT_A) in _check_net_options()
2283 check_net_options(struct drbd_connection *connection, struct net_conf *new_net_conf) in check_net_options() argument
2290 rv = _check_net_options(connection, rcu_dereference(connection->net_conf), new_net_conf); in check_net_options()
2343 alloc_crypto(struct crypto *crypto, struct net_conf *new_net_conf) in alloc_crypto() argument
2348 rv = alloc_ahash(&crypto->csums_tfm, new_net_conf->csums_alg, in alloc_crypto()
2352 rv = alloc_ahash(&crypto->verify_tfm, new_net_conf->verify_alg, in alloc_crypto()
2356 rv = alloc_ahash(&crypto->integrity_tfm, new_net_conf->integrity_alg, in alloc_crypto()
2360 if (new_net_conf->cram_hmac_alg[0] != 0) { in alloc_crypto()
2362 new_net_conf->cram_hmac_alg); in alloc_crypto()
2384 struct net_conf *old_net_conf, *new_net_conf = NULL; in drbd_adm_net_opts() local
2399 new_net_conf = kzalloc(sizeof(struct net_conf), GFP_KERNEL); in drbd_adm_net_opts()
2400 if (!new_net_conf) { in drbd_adm_net_opts()
2417 *new_net_conf = *old_net_conf; in drbd_adm_net_opts()
2419 set_net_conf_defaults(new_net_conf); in drbd_adm_net_opts()
2421 err = net_conf_from_attrs_for_change(new_net_conf, info); in drbd_adm_net_opts()
2428 retcode = check_net_options(connection, new_net_conf); in drbd_adm_net_opts()
2434 if (rsr && strcmp(new_net_conf->csums_alg, old_net_conf->csums_alg)) { in drbd_adm_net_opts()
2441 if (ovr && strcmp(new_net_conf->verify_alg, old_net_conf->verify_alg)) { in drbd_adm_net_opts()
2446 retcode = alloc_crypto(&crypto, new_net_conf); in drbd_adm_net_opts()
2450 rcu_assign_pointer(connection->net_conf, new_net_conf); in drbd_adm_net_opts()
2491 kfree(new_net_conf); in drbd_adm_net_opts()
2528 struct net_conf *old_net_conf, *new_net_conf = NULL; in drbd_adm_connect() local
2579 new_net_conf = kzalloc(sizeof(*new_net_conf), GFP_KERNEL); in drbd_adm_connect()
2580 if (!new_net_conf) { in drbd_adm_connect()
2585 set_net_conf_defaults(new_net_conf); in drbd_adm_connect()
2587 err = net_conf_from_attrs(new_net_conf, info); in drbd_adm_connect()
2594 retcode = check_net_options(connection, new_net_conf); in drbd_adm_connect()
2598 retcode = alloc_crypto(&crypto, new_net_conf); in drbd_adm_connect()
2602 ((char *)new_net_conf->shared_secret)[SHARED_SECRET_MAX-1] = 0; in drbd_adm_connect()
2613 rcu_assign_pointer(connection->net_conf, new_net_conf); in drbd_adm_connect()
2661 kfree(new_net_conf); in drbd_adm_connect()