Lines Matching full:server

31 is_server_using_iface(struct TCP_Server_Info *server,  in is_server_using_iface()  argument
36 struct sockaddr_in *s4 = (struct sockaddr_in *)&server->dstaddr; in is_server_using_iface()
37 struct sockaddr_in6 *s6 = (struct sockaddr_in6 *)&server->dstaddr; in is_server_using_iface()
39 if (server->dstaddr.ss_family != iface->sockaddr.ss_family) in is_server_using_iface()
41 if (server->dstaddr.ss_family == AF_INET) { in is_server_using_iface()
44 } else if (server->dstaddr.ss_family == AF_INET6) { in is_server_using_iface()
74 struct TCP_Server_Info *server) in cifs_ses_get_chan_index() argument
79 if (server && server->terminate) in cifs_ses_get_chan_index()
83 if (ses->chans[i].server == server) in cifs_ses_get_chan_index()
88 if (server) in cifs_ses_get_chan_index()
89 cifs_dbg(VFS, "unable to get chan index for server: 0x%llx", in cifs_ses_get_chan_index()
90 server->conn_id); in cifs_ses_get_chan_index()
96 struct TCP_Server_Info *server) in cifs_chan_set_in_reconnect() argument
98 int chan_index = cifs_ses_get_chan_index(ses, server); in cifs_chan_set_in_reconnect()
108 struct TCP_Server_Info *server) in cifs_chan_clear_in_reconnect() argument
110 unsigned int chan_index = cifs_ses_get_chan_index(ses, server); in cifs_chan_clear_in_reconnect()
120 struct TCP_Server_Info *server) in cifs_chan_set_need_reconnect() argument
122 unsigned int chan_index = cifs_ses_get_chan_index(ses, server); in cifs_chan_set_need_reconnect()
134 struct TCP_Server_Info *server) in cifs_chan_clear_need_reconnect() argument
136 unsigned int chan_index = cifs_ses_get_chan_index(ses, server); in cifs_chan_clear_need_reconnect()
148 struct TCP_Server_Info *server) in cifs_chan_needs_reconnect() argument
150 unsigned int chan_index = cifs_ses_get_chan_index(ses, server); in cifs_chan_needs_reconnect()
160 struct TCP_Server_Info *server) in cifs_chan_is_iface_active() argument
162 unsigned int chan_index = cifs_ses_get_chan_index(ses, server); in cifs_chan_is_iface_active()
174 struct TCP_Server_Info *server = ses->server; in cifs_try_adding_channels() local
196 if (server->dialect < SMB30_PROT_ID) { in cifs_try_adding_channels()
202 if (!(server->capabilities & SMB2_GLOBAL_CAP_MULTI_CHANNEL)) { in cifs_try_adding_channels()
221 cifs_dbg(ONCE, "server %s does not advertise interfaces\n", in cifs_try_adding_channels()
222 ses->server->hostname); in cifs_try_adding_channels()
236 if (iface->rdma_capable != ses->server->rdma) in cifs_try_adding_channels()
293 * called when multichannel is disabled by the server.
301 struct TCP_Server_Info *server; in cifs_disable_secondary_channels() local
316 server = ses->chans[i].server; in cifs_disable_secondary_channels()
323 ses->chans[i].server = NULL; in cifs_disable_secondary_channels()
335 if (server) { in cifs_disable_secondary_channels()
336 if (!server->terminate) { in cifs_disable_secondary_channels()
337 server->terminate = true; in cifs_disable_secondary_channels()
338 cifs_signal_cifsd_for_reconnect(server, false); in cifs_disable_secondary_channels()
340 cifs_put_tcp_session(server, false); in cifs_disable_secondary_channels()
355 cifs_chan_update_iface(struct cifs_ses *ses, struct TCP_Server_Info *server) in cifs_chan_update_iface() argument
365 chan_index = cifs_ses_get_chan_index(ses, server); in cifs_chan_update_iface()
380 spin_lock(&server->srv_lock); in cifs_chan_update_iface()
381 ss = server->dstaddr; in cifs_chan_update_iface()
382 spin_unlock(&server->srv_lock); in cifs_chan_update_iface()
387 cifs_dbg(ONCE, "server %s does not advertise interfaces\n", ses->server->hostname); in cifs_chan_update_iface()
408 if (iface->rdma_capable != server->rdma) in cifs_chan_update_iface()
468 chan_index = cifs_ses_get_chan_index(ses, server); in cifs_chan_update_iface()
509 * the session and server without caring about memory in cifs_ses_add_channel()
534 /* XXX: Use ses->server->hostname? */ in cifs_ses_add_channel()
545 ctx->vals = ses->server->vals; in cifs_ses_add_channel()
546 ctx->ops = ses->server->ops; in cifs_ses_add_channel()
548 ctx->noblocksnd = ses->server->noblocksnd; in cifs_ses_add_channel()
549 ctx->noautotune = ses->server->noautotune; in cifs_ses_add_channel()
550 ctx->sockopt_tcp_nodelay = ses->server->tcp_nodelay; in cifs_ses_add_channel()
551 ctx->echo_interval = ses->server->echo_interval / HZ; in cifs_ses_add_channel()
552 ctx->max_credits = ses->server->max_credits; in cifs_ses_add_channel()
565 memcpy(&ctx->client_guid, ses->server->client_guid, in cifs_ses_add_channel()
569 chan_server = cifs_get_tcp_session(ctx, ses->server); in cifs_ses_add_channel()
573 chan->server = chan_server; in cifs_ses_add_channel()
574 if (IS_ERR(chan->server)) { in cifs_ses_add_channel()
575 rc = PTR_ERR(chan->server); in cifs_ses_add_channel()
576 chan->server = NULL; in cifs_ses_add_channel()
585 cifs_chan_set_need_reconnect(ses, chan->server); in cifs_ses_add_channel()
591 * We need to allocate the server crypto now as we will need in cifs_ses_add_channel()
595 rc = smb311_crypto_shash_allocate(chan->server); in cifs_ses_add_channel()
602 rc = cifs_negotiate_protocol(xid, ses, chan->server); in cifs_ses_add_channel()
604 rc = cifs_setup_session(xid, ses, chan->server, ses->local_nls); in cifs_ses_add_channel()
609 if (rc && chan->server) { in cifs_ses_add_channel()
610 cifs_put_tcp_session(chan->server, 0); in cifs_ses_add_channel()
615 cifs_chan_clear_need_reconnect(ses, chan->server); in cifs_ses_add_channel()
635 struct TCP_Server_Info *server, in cifs_ssetup_hdr() argument
649 pSMB->req.MaxMpxCount = cpu_to_le16(server->maxReq); in cifs_ssetup_hdr()
659 if (server->sign) in cifs_ssetup_hdr()
713 * we did briefly in 2.6.18) since server will use its default in unicode_domain_string()
778 } /* else we send a null domain name so server will default to its own domain */ in ascii_ssetup_strings()
849 cifs_dbg(FYI, "OS/2 server\n"); in decode_ascii_ssetup()
916 …cifs_dbg(VFS, "%s: requested signing/encryption but server did not return either 56-bit or 128-bit… in decode_ntlmssp_challenge()
921 cifs_dbg(VFS, "%s: server does not seem to support either NTLMv1 or NTLMv2\n", __func__); in decode_ntlmssp_challenge()
924 if (ses->server->sign && !(server_flags & NTLMSSP_NEGOTIATE_SIGN)) { in decode_ntlmssp_challenge()
925 cifs_dbg(VFS, "%s: forced packet signing but server does not seem to support it\n", in decode_ntlmssp_challenge()
931 pr_warn_once("%s: authentication has been weakened as server does not support key exchange\n", in decode_ntlmssp_challenge()
1028 struct TCP_Server_Info *server, in build_ntlmssp_negotiate_blob() argument
1057 if (!server->session_estab || ses->ntlmssp->sesskey_per_smbsess) in build_ntlmssp_negotiate_blob()
1090 struct TCP_Server_Info *server, in build_ntlmssp_smb3_negotiate_blob() argument
1119 if (!server->session_estab || ses->ntlmssp->sesskey_per_smbsess) in build_ntlmssp_smb3_negotiate_blob()
1154 struct TCP_Server_Info *server, in build_ntlmssp_auth_blob() argument
1239 (!ses->server->session_estab || ses->ntlmssp->sesskey_per_smbsess) && in build_ntlmssp_auth_blob()
1259 cifs_select_sectype(struct TCP_Server_Info *server, enum securityEnum requested) in cifs_select_sectype() argument
1261 switch (server->negflavor) { in cifs_select_sectype()
1268 if (server->sec_ntlmssp && in cifs_select_sectype()
1271 if ((server->sec_kerberos || server->sec_mskerberos) && in cifs_select_sectype()
1298 struct TCP_Server_Info *server; member
1374 struct TCP_Server_Info *server = sess_data->server; in sess_establish_session() local
1376 cifs_server_lock(server); in sess_establish_session()
1377 if (!server->session_estab) { in sess_establish_session()
1378 if (server->sign) { in sess_establish_session()
1379 server->session_key.response = in sess_establish_session()
1382 if (!server->session_key.response) { in sess_establish_session()
1383 cifs_server_unlock(server); in sess_establish_session()
1386 server->session_key.len = in sess_establish_session()
1389 server->sequence_number = 0x2; in sess_establish_session()
1390 server->session_estab = true; in sess_establish_session()
1392 cifs_server_unlock(server); in sess_establish_session()
1428 struct TCP_Server_Info *server = sess_data->server; in sess_auth_ntlmv2() local
1440 capabilities = cifs_ssetup_hdr(ses, server, pSMB); in sess_auth_ntlmv2()
1538 struct TCP_Server_Info *server = sess_data->server; in sess_auth_kerberos() local
1553 capabilities = cifs_ssetup_hdr(ses, server, pSMB); in sess_auth_kerberos()
1555 spnego_key = cifs_get_spnego_key(ses, server); in sess_auth_kerberos()
1679 struct TCP_Server_Info *server = sess_data->server; in _sess_auth_rawntlmssp_assemble_req() local
1685 capabilities = cifs_ssetup_hdr(ses, server, pSMB); in _sess_auth_rawntlmssp_assemble_req()
1719 struct TCP_Server_Info *server = sess_data->server; in sess_auth_rawntlmssp_negotiate() local
1747 &blob_len, ses, server, in sess_auth_rawntlmssp_negotiate()
1825 struct TCP_Server_Info *server = sess_data->server; in sess_auth_rawntlmssp_authenticate() local
1842 &blob_len, ses, server, in sess_auth_rawntlmssp_authenticate()
1850 * Make sure that we tell the server that we are using in sess_auth_rawntlmssp_authenticate()
1931 struct TCP_Server_Info *server = sess_data->server; in select_sec() local
1933 type = cifs_select_sectype(server, ses->sectype); in select_sec()
1964 struct TCP_Server_Info *server, in CIFS_SessSetup() argument
1981 sess_data->server = server; in CIFS_SessSetup()