From patchwork Thu Jul 17 08:06:10 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Gundersen X-Patchwork-Id: 371004 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 6468714010C for ; Thu, 17 Jul 2014 18:07:55 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755397AbaGQIHq (ORCPT ); Thu, 17 Jul 2014 04:07:46 -0400 Received: from mail-we0-f173.google.com ([74.125.82.173]:60488 "EHLO mail-we0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755404AbaGQIGk (ORCPT ); Thu, 17 Jul 2014 04:06:40 -0400 Received: by mail-we0-f173.google.com with SMTP id q58so2038901wes.32 for ; Thu, 17 Jul 2014 01:06:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=T/3Y+4w2qrnBBhHI5bx5u8OnPIl7djBu/CNewLd3Tq8=; b=Xhhf2kyhGHGODr9orOmlWCNi1Yk3YrIhAAVyXm+04dI5HO77KyJZSNQxe1J0d0+Xji uyDJJoNJDpX7+sB9twR1/5JAGLpVY+u2N1fUPqypKTA8UWPnucaZ5PZ8Ru/ogRyRCi+n jYFIvZ24dzooUcbpYmSeDLDDV3x6q6DMlpy0mYl0D5d2/m4QSOXtsKcfBCSPDP88UnEM CvDlieZrhPxeXsQ9p3AJMIT+XCM9kaXXFqBxUcvOBtdwTUERLwR+eAJ25wJXQe4cOTEB 5FY5eQGpGXcUrpbPUF8FSGC8VISV2DJZaDOgY522BlnCjenzqAGnAC8ZsNTMlVcsj69G VmPg== X-Gm-Message-State: ALoCoQk3lbX9WzdjxrdD+MpsUdaAhZxILS0+nQYdRy1DFibJPTufiO5zXrqJQ+eMUWcfrquncUHD X-Received: by 10.180.76.132 with SMTP id k4mr20037705wiw.1.1405584397368; Thu, 17 Jul 2014 01:06:37 -0700 (PDT) Received: from tomegun-x240.localdomain (cm-84.208.72.173.getinternet.no. [84.208.72.173]) by mx.google.com with ESMTPSA id ch5sm4297467wjb.18.2014.07.17.01.06.35 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 17 Jul 2014 01:06:36 -0700 (PDT) From: Tom Gundersen To: netdev@vger.kernel.org Cc: David Miller , linux-kernel@vger.kernel.org, Tom Gundersen , Paul Mackerras , linux-ppp@vger.kernel.org Subject: [PATCH net-next v9 9/9] net: ppp - set name assign type Date: Thu, 17 Jul 2014 10:06:10 +0200 Message-Id: <1405584370-30054-10-git-send-email-teg@jklm.no> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1405584370-30054-1-git-send-email-teg@jklm.no> References: <1405584370-30054-1-git-send-email-teg@jklm.no> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org The ifname is of the form pppX where X is the unit number. This is either set by userspace, or userspace requests the kernel to chose one, which is then returned to userspace. Either way the creating user knows the name, so we treat both cases as if the user had explicitly chosen the name and label it NET_NAME_USER. Signed-off-by: Tom Gundersen Cc: Paul Mackerras Cc: linux-ppp@vger.kernel.org --- drivers/net/ppp/ppp_generic.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ppp/ppp_generic.c b/drivers/net/ppp/ppp_generic.c index c38ee90..6526057 100644 --- a/drivers/net/ppp/ppp_generic.c +++ b/drivers/net/ppp/ppp_generic.c @@ -2728,6 +2728,7 @@ ppp_create_interface(struct net *net, int unit, int *retp) /* Initialize the new ppp unit */ ppp->file.index = unit; sprintf(dev->name, "ppp%d", unit); + dev->name_assign_type = NET_NAME_USER; ret = register_netdev(dev); if (ret != 0) {