[PATCHES] SMB3 Multi-Channel: session binding

Michael Adam obnox at samba.org
Fri Jan 22 10:21:01 UTC 2016


On 2016-01-22 at 10:35 +0100, Ralph Boehme wrote:
> 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?

I would like to do it for consistency.
I would remove the old dialects (2.2.2, 2.2.4) later in a
sweeping change.
But I would like to do it after having finished the current
work on MC.
Spoke to Metze and he agreed on that (if that helps you). ;-)

> > > 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. :)

Indeed.

Will follow up with updated patchset next.

Michael


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20160122/e966f865/signature.sig>


More information about the samba-technical mailing list