Re: [PATCH] cifs: On cifs_reconnect, resolve the hostname again.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



merged into cifs-2.6.git for-next

On Tue, Apr 6, 2021 at 11:34 AM Pavel Shilovsky <piastryyy@xxxxxxxxx> wrote:
>
> Looks good!
>
> Reviewed-by: Pavel Shilovsky <pshilov@xxxxxxxxxxxxx>
>
> CC: <stable@xxxxxxxxxxxxxxx> # 5.11+
>
> --
> Best regards,
> Pavel Shilovsky
>
> пн, 5 апр. 2021 г. в 19:07, Shyam Prasad N <nspmangalore@xxxxxxxxx>:
> >
> > Hi Paulo,
> >
> > Thanks for the quick review. And nice catch about CONFIG_CIFS_DFS_UPCALL.
> > Fixed it, added CC for stable.
> > Attached updated patch.
> >
> > Regards,
> > Shyam
> >
> > On Mon, Apr 5, 2021 at 9:24 PM Paulo Alcantara <pc@xxxxxx> wrote:
> > >
> > > Shyam Prasad N <nspmangalore@xxxxxxxxx> 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@xxxxxxxxxxxxx>
> > > > 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@xxxxxxxxxxxxx>
> > > > ---
> > > >  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@xxxxxx>
> >
> >
> >
> > --
> > Regards,
> > Shyam



-- 
Thanks,

Steve




[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux