From patchwork Thu Jul 10 08:17:35 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Gundersen X-Patchwork-Id: 368509 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 311BD1400A8 for ; Thu, 10 Jul 2014 18:21:08 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752540AbaGJIVD (ORCPT ); Thu, 10 Jul 2014 04:21:03 -0400 Received: from mail-la0-f50.google.com ([209.85.215.50]:53679 "EHLO mail-la0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752365AbaGJITG (ORCPT ); Thu, 10 Jul 2014 04:19:06 -0400 Received: by mail-la0-f50.google.com with SMTP id pv20so5754996lab.23 for ; Thu, 10 Jul 2014 01:19:04 -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=7cDVa5RntGvsUwX7YphCBamw2CDwh2gPUO5Wkn4h6ik=; b=mUkzTieqDgpfB94nx5qrpj2eGaXG8fbsD6XocGQOeyILJq1umMsO99D7IwdnZWHJDI S9zjIj8YB3mBAhGw84DA20UmexNnI3h6YbNYWFk5OzWjjkxilii6m7TVu89K8DEACwq/ anDI2e19rb+P4hXosDoZ+LBGZD725rUXAUIRpIu4BSDScfGE8lbw0SFb2iWwAd/9Rgfi 6VQG3gU0UCCiTQUM1+qUqK3w++czrS1GRGwxaJNFwx7bYL73I1cQziy7GE+HHUMHd9hn l54zMmvug4MUAAoS+XUX8zRw8wCtspWIDryxcO2VZmeha7qj6Lt0S4WG+2dtRQezv61R C15w== X-Gm-Message-State: ALoCoQlBJKQHNsI96jrEA+P8Bn33UA4zKq0BLFm3IYUa/qYVh8Rk16GmKmNvi9juzHTabk6wmQRT X-Received: by 10.112.97.163 with SMTP id eb3mr1403079lbb.67.1404980344826; Thu, 10 Jul 2014 01:19:04 -0700 (PDT) Received: from localhost.localdomain (m188-149-105-114.cust.tele2.no. [188.149.105.114]) by mx.google.com with ESMTPSA id tg1sm37154793lbb.11.2014.07.10.01.19.02 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 10 Jul 2014 01:19:03 -0700 (PDT) From: Tom Gundersen To: netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org, David Miller , David Herrmann , Kay Sievers , Tom Gundersen , Paul Mackerras , linux-ppp@vger.kernel.org Subject: [PATCH v7 30/33] net: ppp - set name assign type Date: Thu, 10 Jul 2014 10:17:35 +0200 Message-Id: <1404980258-30853-31-git-send-email-teg@jklm.no> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1404980258-30853-1-git-send-email-teg@jklm.no> References: <1404980258-30853-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 even 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 5c002b1..9757b52 100644 --- a/drivers/net/ppp/ppp_generic.c +++ b/drivers/net/ppp/ppp_generic.c @@ -2726,6 +2726,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) {