[linux-cifs-client] [PATCH 06/11] cifs: eliminate "first_time" parm to CIFS_SessSetup

Steve French smfrench at gmail.com
Tue Apr 27 18:36:45 MDT 2010


On Tue, Apr 27, 2010 at 6:20 AM, Jeff Layton <jlayton at redhat.com> wrote:
> On Tue, 27 Apr 2010 07:03:20 -0400
> Jeff Layton <jlayton at redhat.com> wrote:
>
>> On Mon, 26 Apr 2010 21:45:53 -0500
>> Steve French <smfrench at gmail.com> wrote:
>>
>> > On Sat, Apr 24, 2010 at 6:57 AM, Jeff Layton <jlayton at redhat.com> wrote:
>> > > We can use the is_first_ses_reconnect() function to determine this.
>> >
>> > This is a slight behavior change - we will end up issuing
>> > another SMB negprot after reconnect (which we didn't do before).
>> >
>> > May be harmless, but worth thinking through
>> >
>> >
>>
>> The comment in cifs_setup_session is misleading. I don't think there's
>> a behavior change. cifs_reconnect does this:
>>
>>     server->maxBuf = 0;
>>
>> ...and that triggers a new negprot on reconnect in the current
>> code.
>
> ...and I think the current behavior is correct according to the spec.
> The MS-CIFS doc says:
>
> "An SMB_COM_NEGOTIATE exchange MUST be completed before any other SMB
> messages MAY be sent to the server."
>
> ...since the server doesn't have any idea that this is a reconnect, I'd
> assume that some (most? all?) servers would reject other SMB's on a
> socket that hasn't had a negprot done on it.

Your explanation makes sense - merged.


-- 
Thanks,

Steve


More information about the linux-cifs-client mailing list