linux-ppp.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v7 30/33] net: ppp - set name assign type
       [not found] <1404980258-30853-1-git-send-email-teg@jklm.no>
@ 2014-07-10  8:17 ` Tom Gundersen
  0 siblings, 0 replies; only message in thread
From: Tom Gundersen @ 2014-07-10  8:17 UTC (permalink / raw)
  To: netdev
  Cc: linux-kernel, David Miller, David Herrmann, Kay Sievers,
	Tom Gundersen, Paul Mackerras, linux-ppp

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 <teg@jklm.no>
Cc: Paul Mackerras <paulus@samba.org>
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) {
-- 
1.9.3


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2014-07-10  8:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1404980258-30853-1-git-send-email-teg@jklm.no>
2014-07-10  8:17 ` [PATCH v7 30/33] net: ppp - set name assign type Tom Gundersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).