From: Johannes Berg <johannes@sipsolutions.net>
To: David Herrmann <dh.herrmann@gmail.com>
Cc: netdev <netdev@vger.kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Kay Sievers <kay.sievers@vrfy.org>, Tom Gundersen <teg@jklm.no>,
linux-kernel <linux-kernel@vger.kernel.org>,
linux-wireless <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH 2/4] mac80211: set NET_NAME_USER for user-space created ifs
Date: Thu, 27 Feb 2014 17:18:32 +0100 [thread overview]
Message-ID: <1393517912.4648.5.camel@jlt4.sipsolutions.net> (raw)
In-Reply-To: <CANq1E4RNbtbdVhC2PgyZMGN_duScbmCOGeMxAYiKLL-8H=EWSA@mail.gmail.com> (sfid-20140227_155615_730008_8D7E77AA)
On Thu, 2014-02-27 at 15:56 +0100, David Herrmann wrote:
> >> +++ b/net/mac80211/iface.c
> >> @@ -1620,6 +1620,7 @@ int ieee80211_if_add(struct ieee80211_local *local, const char *name,
> >> + IEEE80211_ENCRYPT_HEADROOM;
> >> ndev->needed_tailroom = IEEE80211_ENCRYPT_TAILROOM;
> >>
> >> + ndev->name_assign_type = NET_NAME_USER;
> >
> > this is wrong because we call this in main.c with a "wlan%d" argument
> > for the name, which gets expanded.
>
> Whoops, yeah, same issue as with ath6kl where I fixed it with a
> separate "name_assign_type" argument. I will do the same here for v2.
I'm not sure that helps - the user could potentially pass "foobar%d" as
the interface name and get a number assigned by the kernel. In that case
you probably *don't* want to set it to "name assigned by user"?
Maybe this whole thing can just be handled in __dev_alloc_name() since
no kernel user should pass just a string without "%d" in it.
johannes
next prev parent reply other threads:[~2014-02-27 16:18 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-27 14:47 [PATCH 0/4] Provide netdev naming-policy via sysfs David Herrmann
2014-02-27 14:47 ` [PATCH 1/4] net: add name_assign_type netdev attribute David Herrmann
2014-02-27 14:47 ` [PATCH 2/4] mac80211: set NET_NAME_USER for user-space created ifs David Herrmann
2014-02-27 14:53 ` Johannes Berg
2014-02-27 14:56 ` David Herrmann
2014-02-27 16:18 ` Johannes Berg [this message]
2014-02-27 17:14 ` David Herrmann
2014-02-27 14:47 ` [PATCH 3/4] ath6kl: set NET_NAME_USER for P2P ifs David Herrmann
2014-02-27 15:27 ` Kalle Valo
2014-02-27 16:13 ` Kalle Valo
2014-02-27 14:47 ` [PATCH 4/4] brcmfmac: " David Herrmann
2014-02-27 17:30 ` Arend van Spriel
2014-02-27 15:47 ` [PATCH 0/4] Provide netdev naming-policy via sysfs Tom Gundersen
2014-03-01 14:19 ` Tom Gundersen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1393517912.4648.5.camel@jlt4.sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=davem@davemloft.net \
--cc=dh.herrmann@gmail.com \
--cc=kay.sievers@vrfy.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=teg@jklm.no \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).