[PATCHES] SMB3 Multi-Channel: session binding
Ralph Boehme
rb at sernet.de
Fri Jan 22 09:35:02 UTC 2016
On Fri, Jan 22, 2016 at 10:08:30AM +0100, Michael Adam wrote:
> On 2016-01-22 at 09:20 +0100, Ralph Boehme wrote:
> > Hi Michael,
>
> Hi Ralph,
>
> and thanks for your feed-back!
>
> > great to see this moving forward! :)
> >
> > I was just wondering whether this:
> >
> > On Fri, Jan 22, 2016 at 01:28:47AM +0100, Michael Adam wrote:
> > > + if (protocol >= PROTOCOL_SMB2_22 && SMBD_IS_MULTI_CHANNEL_CAPABLE) {
> > > + if (in_capabilities & SMB2_CAP_MULTI_CHANNEL) {
> > > + capabilities |= SMB2_CAP_MULTI_CHANNEL;
> > > + }
> > > + }
> > > +
> >
> > is right. Shouldn't we compared against PROTOCOL_SMB3_00?
>
> Well, SMB 2.22 was the first (prerelease) incarnation of what is
> nowadays called SMB 3. It is not a version that exists any longer,
> but it is the version we usually compare against when actually
> checking for SMB 3. Tom Talpey from Microsoft suggested we should
> generally remove references to SMB 2.22 and 2.24, but that would
> be a more general change that would touch many places in the
> code. But this way it is at least consistent with our other SMB3
> code.
I still don't think we should introduce new references, should we?
> > Besides that, the global used to disable MC seems somewhat unelegant
> > to me. I guess there isn't a nicer way of achieving the same goal?
>
> Well, I wanted to have the code in place withouth activating it
> and activate it later based on the smb.conf parameter.
> So this seemed a good way to prepare everything and then later
> just change that global to the value of lp_multi_channel()
> to enable activation.
>
> By the way: having a global variable for determining whether the
> server is multi-channel capable is the thing that the [MS-SMB2]
> document also describes. They call it IsMultiChannelCapable ...
>
> Originally, the code looked like:
>
> if (protocol >= PROTOCOL_SMB2_22 && lp_multi_channel()) {
> ...
>
> If you have a more elegant way, I am all ears!
Looks like metze already came up with a suggestion. :)
Thanks!
-Ralph
--
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de,mailto:kontakt@sernet.de
More information about the samba-technical
mailing list