Inconsistencies/bug with SMB signatures during smbclient tar
jra at samba.org
Sat Jan 17 00:32:16 GMT 2004
On Fri, Jan 16, 2004 at 09:46:55AM -0600, Fran Fabrizio wrote:
> It fails approximately 750MB/a little over 2 minutes into the tar (on other
> shares, it was failing anywhere from 750MB-1.1GB and 2-3minutes in).
> I have attached a debug level 10 log with 250 lines of context on either
> side of the "SMB signature check failed on seq 7" error. If you need
> anything else, let me know - I've got the whole debug level 10 output, but
> it's ~ 250MB in size.
Ok, I have a fix for this. Can you apply this patch and test
again please ?
-------------- next part --------------
RCS file: /data/cvs/samba/source/libsmb/smb_signing.c,v
retrieving revision 22.214.171.124
diff -u -r126.96.36.199 smb_signing.c
--- libsmb/smb_signing.c 27 Dec 2003 10:11:26 -0000 188.8.131.52
+++ libsmb/smb_signing.c 17 Jan 2004 00:27:03 -0000
@@ -46,15 +46,23 @@
uint16 mid, uint32 reply_seq_num)
struct outstanding_packet_lookup *t;
- struct outstanding_packet_lookup *tmp;
t = smb_xmalloc(sizeof(*t));
- DLIST_ADD_END(*list, t, tmp);
t->mid = mid;
t->reply_seq_num = reply_seq_num;
+ * Add to the *start* of the list not the end of the list.
+ * This ensures that the *last* send sequence with this mid
+ * is returned by preference.
+ * This can happen if the mid wraps and one of the early
+ * mid numbers didn't get a reply and is still lurking on
+ * the list. JRA. Found by Fran Fabrizio <fran at cis.uab.edu>.
+ DLIST_ADD(*list, t);
DEBUG(10,("store_sequence_for_reply: stored seq = %u mid = %u\n",
(unsigned int)reply_seq_num, (unsigned int)mid ));
More information about the samba-technical