All of lore.kernel.org
 help / color / mirror / Atom feed
* reconnection loop
@ 2017-11-29 12:14 Matthias Urlichs
       [not found] ` <dd42aeea-3097-b013-fb9b-633df41ec49e-+qxcz+fHsVSELgA04lAiVw@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Matthias Urlichs @ 2017-11-29 12:14 UTC (permalink / raw)
  To: linux-cifs-u79uwXL29TY76Z2rM5mHXA

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.

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 …

-- 
-- Matthias Urlichs

^ permalink raw reply	[flat|nested] 2+ messages in thread

* RE: reconnection loop
       [not found] ` <dd42aeea-3097-b013-fb9b-633df41ec49e-+qxcz+fHsVSELgA04lAiVw@public.gmane.org>
@ 2017-11-29 14:16   ` Tom Talpey
  0 siblings, 0 replies; 2+ messages in thread
From: Tom Talpey @ 2017-11-29 14:16 UTC (permalink / raw)
  To: Matthias Urlichs, linux-cifs-u79uwXL29TY76Z2rM5mHXA

> -----Original Message-----
> From: linux-cifs-owner@vger.kernel.org [mailto:linux-cifs-
> owner@vger.kernel.org] On Behalf Of Matthias Urlichs
> Sent: Wednesday, November 29, 2017 7:14 AM
> To: linux-cifs@vger.kernel.org
> 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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-11-29 14:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-29 12:14 reconnection loop Matthias Urlichs
     [not found] ` <dd42aeea-3097-b013-fb9b-633df41ec49e-+qxcz+fHsVSELgA04lAiVw@public.gmane.org>
2017-11-29 14:16   ` Tom Talpey

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.