summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2014-07-09 09:48:52 +0200
committerTom Gundersen <teg@jklm.no>2015-03-16 17:05:08 +0100
commitf30621d400672b4b593fb54fe7ea5e02c7d05eb7 (patch)
treed81f6bf0a605fb84027e922f348a891488d42fbf
parent40d9217b6524ebfb0d12e392afc203f1f0430f64 (diff)
net: ppp - set name assign typenet-name
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 <teg@jklm.no> Cc: Paul Mackerras <paulus@samba.org> Cc: linux-ppp@vger.kernel.org
-rw-r--r--drivers/net/ppp/ppp_generic.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ppp/ppp_generic.c b/drivers/net/ppp/ppp_generic.c
index af034dba9bd6..172b61a67365 100644
--- a/drivers/net/ppp/ppp_generic.c
+++ b/drivers/net/ppp/ppp_generic.c
@@ -2736,6 +2736,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) {