All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paulo Alcantara <pc@cjr.nz>
To: Shyam Prasad N <nspmangalore@gmail.com>,
	Steve French <smfrench@gmail.com>,
	CIFS <linux-cifs@vger.kernel.org>
Subject: Re: [PATCH] cifs: On cifs_reconnect, resolve the hostname again.
Date: Mon, 05 Apr 2021 12:54:36 -0300	[thread overview]
Message-ID: <87im50vi9v.fsf@cjr.nz> (raw)
In-Reply-To: <CANT5p=qWyYCD_gSw-AzvxOgzTzWkBK1uUz-16YougX5No8jjgQ@mail.gmail.com>

Shyam Prasad N <nspmangalore@gmail.com> writes:

> Please consider the attached patch for performing the DNS query again
> on reconnect.
> This is important when connecting to Azure file shares. The UNC
> generally contains the server name as a FQDN, and the IP address which
> the name resolves to can change over time.
>
> After our last conversation about this, I discovered that for the
> non-DFS scenario, we never do DNS resolutions in cifs.ko, since
> mount.cifs already resolves the name and passes the "addr=" arg during
> mount.

Yeah, this should happen for both cases.  Good catch!

> I noticed that you had a patch for this long back. But I don't see
> that call happening in the latest code. Any idea why that was done?

I don't know.  Maybe some other patch broke it.

We should probably mark it for stable as well.

> From 289f7f0fa229ea181094821c309a2ba9358791a3 Mon Sep 17 00:00:00 2001
> From: Shyam Prasad N <sprasad@microsoft.com>
> Date: Wed, 31 Mar 2021 14:35:24 +0000
> Subject: [PATCH] cifs: On cifs_reconnect, resolve the hostname again.
>
> On cifs_reconnect, make sure that DNS resolution happens again.
> It could be the cause of connection to go dead in the first place.
>
> Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
> ---
>  fs/cifs/connect.c | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)

This patch breaks when CONFIG_CIFS_DFS_UPCALL isn't set.

Please declare reconn_set_ipaddr_from_hostname() outside the "#ifdef
CONFIG_CIFS_DFS_UPCALL" in connect.c.

Otherwise,

Reviewed-by: Paulo Alcantara (SUSE) <pc@cjr.nz>

  reply	other threads:[~2021-04-05 15:54 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-05 15:33 [PATCH] cifs: On cifs_reconnect, resolve the hostname again Shyam Prasad N
2021-04-05 15:54 ` Paulo Alcantara [this message]
2021-04-05 16:06   ` Shyam Prasad N
2021-04-06 16:34     ` Pavel Shilovsky
2021-04-07  3:43       ` Steve French
2021-04-07 17:43         ` Shyam Prasad N
2021-04-07 19:00           ` Steve French
2021-04-08  2:25             ` Steve French
2021-04-08  8:41           ` Aurélien Aptel
2021-04-08 10:50             ` Shyam Prasad N

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87im50vi9v.fsf@cjr.nz \
    --to=pc@cjr.nz \
    --cc=linux-cifs@vger.kernel.org \
    --cc=nspmangalore@gmail.com \
    --cc=smfrench@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.