From mboxrd@z Thu Jan 1 00:00:00 1970 From: Guillaume Nault Subject: Re: [PATCH v2 net-next 2/5] l2tp: double-check l2specific_type provided by userspace Date: Mon, 15 Jan 2018 19:44:25 +0100 Message-ID: <20180115184425.GD1422@alphalink.fr> References: <119b4940ea365493fbf3c22f5f485ee800254fb3.1515940731.git.lorenzo.bianconi@redhat.com> <20180115180019.GA1422@alphalink.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: "David S. Miller" , netdev@vger.kernel.org, James Chapman To: Lorenzo Bianconi Return-path: Received: from zimbra.alphalink.fr ([217.15.80.77]:59605 "EHLO zimbra.alphalink.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751043AbeAOSo1 (ORCPT ); Mon, 15 Jan 2018 13:44:27 -0500 Content-Disposition: inline In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: On Mon, Jan 15, 2018 at 07:18:17PM +0100, Lorenzo Bianconi wrote: > > On Sun, Jan 14, 2018 at 03:50:55PM +0100, Lorenzo Bianconi wrote: > >> Add sanity check on l2specific_type provided by userspace in > >> l2tp_nl_cmd_session_create() since just L2TP_L2SPECTYPE_DEFAULT and > >> L2TP_L2SPECTYPE_NONE are currently supported. > >> Moreover do not always initialize l2specific_type if userspace requests > >> a given l2-specific sublayer type > >> > > I don't understand your last sentence. l2specific_type is always > > initialised in your patch (or session creation is aborted). > > > > I mean to explicitly set l2specific_type to L2TP_L2SPECTYPE_DEFAULT > only if the userspace does not provide a value for it (I moved the > 'default' initialization in the 'else' case) > Ok, I thought you were talking about a functional change.