From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751540AbcGPKIp (ORCPT ); Sat, 16 Jul 2016 06:08:45 -0400 Received: from mail-wm0-f51.google.com ([74.125.82.51]:37766 "EHLO mail-wm0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751374AbcGPKIm (ORCPT ); Sat, 16 Jul 2016 06:08:42 -0400 MIME-Version: 1.0 In-Reply-To: References: <1466760574-1916-1-git-send-email-mpa@pengutronix.de> <1466760574-1916-2-git-send-email-mpa@pengutronix.de> From: Pranay Srivastava Date: Sat, 16 Jul 2016 15:38:40 +0530 Message-ID: Subject: Re: [Nbd] [PATCH 2/2] nbd: Disallow ioctls on disconnected block device To: Alex Bligh Cc: Markus Pargmann , "nbd-general@lists.sourceforge.net" , Wouter Verhelst , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jul 16, 2016 at 3:02 PM, Alex Bligh wrote: > > On 16 Jul 2016, at 08:42, Pranay Srivastava wrote: > >> So instead can't we put a mechanism in place for network address + mac >> to be same >> for allowing clients to reconnect? Do let me know if this is not of concern. > > MAC address?! nbd clients connect over IP, and if a router reboots > between them, you could easily see two packets from the same client > come from different MAC addresses. Similarly all clients not on > the same L2 network will carry the same MAC address. So MAC address > is a very poor indicator of 'same client'. > > IP address is also a poor indicator (think NAT) but is substantially > less bad. Okay. So how about we include some negotiated key which goes in with every request which the server could maintain for clients that can be checked while resetting the connection with the same server? So am I correct that this situation can indeed happen or the server will throw an error back to client in case the troubled nbd-client is trying to reconnect to the original server but requests are going to another server? If yes to above query then what is the best effort we can do to avoid such scenarios? > > -- > Alex Bligh > > > > -- ---P.K.S