> -----Original Message----- > From: linux-cifs-owner@xxxxxxxxxxxxxxx [mailto:linux-cifs- > owner@xxxxxxxxxxxxxxx] On Behalf Of Matthias Urlichs > Sent: Wednesday, November 29, 2017 7:14 AM > To: linux-cifs@xxxxxxxxxxxxxxx > Subject: reconnection loop > > Hi, > > I am observing a reconnect loop with samba4. > > The problem is that the kernel opens the connection and initially sends > an SMBecho packet. Samba4 however only accepts SMBnegprot as the first > packet, thus it immediately closes the connection. The kernel > immediately tries again. That's clearly a client bug, and the server is doing the right thing. Before a dialect is negotiated, the protocol requirement is clear: MS-SMB2: 3.3.5.2.2 Verifying the Connection State If the request being received is not an SMB2 NEGOTIATE Request or a traditional SMB_COM_NEGOTIATE, as described in section 1.7, and Connection.NegotiateDialect is 0xFFFF or 0x02FF, the server MUST disconnect the connection, as specified in section 3.3.7.1, and send no reply. > Regardless of whether it's acceptable to initially send an echo packet: > shouldn't the kernel do some sort of rudimentary back-off? as it is I > have logged 15 million reconnections since yesterday … Possibly backoff is indicated, but it won't fix the violation. Tom. ��.n��������+%������w��{.n�����{�����ܨ}���Ơz�j:+v�����w����ޙ��&�)ߡ�a����z�ޗ���ݢj��w�f