[PATCH][SMB3] Add missing defines for new negotiate contexts

Tom Talpey ttalpey at microsoft.com
Thu May 23 18:24:16 UTC 2019

> -----Original Message-----
> From: Stefan Metzmacher <metze at samba.org>
> Sent: Thursday, May 23, 2019 9:51 AM
> To: Tom Talpey <ttalpey at microsoft.com>; Jeremy Allison <jra at samba.org>;
> Steve French <smfrench at gmail.com>
> Cc: CIFS <linux-cifs at vger.kernel.org>; samba-technical <samba-
> technical at lists.samba.org>
> Subject: Re: [PATCH][SMB3] Add missing defines for new negotiate contexts
> Hi Tom,
> >> The Windows protocol documents were updated on March 13 for the
> >> upcoming "19H1" update cycle.
> >>
> >> MS-SMB2 version page, with latest, diffs, etc:
> >>
> >> https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-
> smb2/5606ad47-5ee0-437a-817e-70c366052962
> >
> > So, there was a defect in the published spec which we just corrected, there's a
> new
> > update online at the above page.
> >
> > The value of the new compression contextid is actually "3", but the earlier
> document
> > incorrectly said "4". There were several other fixes and clarifications in the
> pipeline
> > which have also been included.
> >
> > Redline diffs as well as the usual standard publication formats are available.
> There's no server behavior defined for
> SMB2_NETNAME_NEGOTIATE_CONTEXT_ID. If there's none, why was it added
> at all?

It's an advisory payload, and can be used to direct the connection appropriately
by load balancers, servers hosting multiple names, and the like. It's basically the
same servername that will be presented later in SMB2_TREE_CONNECT, only it's
available early, prior to any SMB3 processing. Other possible uses are for logging
and diagnosis.

It has no actual function in the SMB3 protocol, so apart from defining the payload
it's not a matter for the MS-SMB2 document. We would hope, however, that clients
will include the context when sending SMB2_NEGOTIATE.


More information about the samba-technical mailing list