CLI_BUFFER_SIZE for trans2/nttrans max_data

Stefan (metze) Metzmacher metze at samba.org
Tue Aug 2 15:22:54 MDT 2011


Hi Jeremy,
hi Volker,

do you see any problems with this patches:
http://gitweb.samba.org/?p=metze/samba/wip.git;a=commitdiff;h=f69dd6c9d8b0d48f7f0459f9272feebc5e40beb7
http://gitweb.samba.org/?p=metze/samba/wip.git;a=commitdiff;h=7e2d0f92fc44765bea9f3153239cdfaff36349af

The change the callers of trans2/nttrans related calls to use
CLI_BUFFER_SIZE instead of cli->max_xmit in the max_data field.

Using cli->max_xmit in the max_data field means that we could
be fragmented trans2/nttrans replies, as max_xmit mean the whole
SMB pdu, and it we add the SMB header and the trans2/nttrans reply
overhead on top of max_xmit, the value can be larger than max_xmit...

So I see no reason why we should not use a fixed size CLI_BUFFER_SIZE
(0xffff)
instead of cli->max_xmit.

metze

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20110802/f7116075/attachment.pgp>


More information about the samba-technical mailing list