[PATCHES] SMB3 Multi-Channel: session binding

Michael Adam obnox at samba.org
Fri Jan 22 09:08:30 UTC 2016

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

> 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!

Cheers - 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/4ab7f18c/signature.sig>

More information about the samba-technical mailing list