SMB2/3 Credits (Multi-Credit) support

Michael Adam obnox at
Thu Jun 28 00:04:53 MDT 2012

Jeremy Allison wrote:
> On Thu, Jun 28, 2012 at 01:16:38AM +0200, Stefan (metze) Metzmacher wrote:
> > 
> > DEFAULT_SMB2_MAX_CREDIT_BITMAP_FACTOR was just there to hide real bugs.
> > 
> > 1. If the client starts with a SMB1 negprot, we never removed seqnum 0.
> > 
> > 2. when moving the seqnum_low, we didn't calculate the bitmap_offset
> > correct.
> > 
> > 3. we moved seqnum_low + 1 (as lowest value) instead of id == seqnum_low.
> > 
> > 4. we didn't stop granting credits if the client didn't use seqnum_low.
> > 
> > I've tested my patches a lot, using a modified smbtorture
> > to check how windows behaves and in what situation it stops granting credits
> > and disconnect the connection if a use an invalid seqnum.
> Fair enough. We'll need to get these bugs fixed in
> though.
> Can you log separate bugs for each of these so we can get
> the patches into the v3-6-test tree ?

This sounds like a good plan. (Not sure how many bugs we can
really make out of it.)

I reviewed the code a lot and admittedly also discussed the logic
with Metze to some extent since I did not now enough about the
crediting system before. The new code is imho very clean and understandable
and seems to be correct.

+1 for this in master and for tracking bugs for 3.6 for the
mentioned bugs.

Cheers - Michael

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 206 bytes
Desc: not available
URL: <>

More information about the samba-technical mailing list