From: Alexander Aring <alex.aring@gmail.com>
To: David Miller <davem@davemloft.net>
Cc: teg@jklm.no, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org,
linux-zigbee-devel@lists.sourceforge.net
Subject: Re: [Linux-zigbee-devel] [PATCH net-next v9 3/9] net: nl802154 - make add_iface take name assign type
Date: Fri, 18 Jul 2014 10:18:12 +0200 [thread overview]
Message-ID: <20140718081810.GA6555@omega> (raw)
In-Reply-To: <20140717.161931.283488873926282207.davem@davemloft.net>
On Thu, Jul 17, 2014 at 04:19:31PM -0700, David Miller wrote:
> From: Tom Gundersen <teg@jklm.no>
> Date: Thu, 17 Jul 2014 10:06:04 +0200
>
> > @@ -192,8 +193,10 @@ int ieee802154_add_iface(struct sk_buff *skb, struct genl_info *info)
> > if (devname[nla_len(info->attrs[IEEE802154_ATTR_DEV_NAME]) - 1]
> > != '\0')
> > return -EINVAL; /* phy name should be null-terminated */
> > + name_assign_type = NET_NAME_USER;
> > } else {
> > devname = "wpan%d";
> > + name_assign_type = NET_NAME_ENUM;
> > }
> >
> > if (strlen(devname) >= IFNAMSIZ)
>
> Just wondering what should happen if "%d" appears in a user provided name.
>
I tested it. If I use a name like "foobar%d" then I get a foobar0,
foobar1 ... foobarX.
> That would seem to be both USER and ENUM.
>
yes.
- Alex
WARNING: multiple messages have this Message-ID (diff)
From: Alexander Aring <alex.aring-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: David Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
Cc: teg-B22kvLQNl6c@public.gmane.org,
netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-zigbee-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Re: [PATCH net-next v9 3/9] net: nl802154 - make add_iface take name assign type
Date: Fri, 18 Jul 2014 10:18:12 +0200 [thread overview]
Message-ID: <20140718081810.GA6555@omega> (raw)
In-Reply-To: <20140717.161931.283488873926282207.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
On Thu, Jul 17, 2014 at 04:19:31PM -0700, David Miller wrote:
> From: Tom Gundersen <teg-B22kvLQNl6c@public.gmane.org>
> Date: Thu, 17 Jul 2014 10:06:04 +0200
>
> > @@ -192,8 +193,10 @@ int ieee802154_add_iface(struct sk_buff *skb, struct genl_info *info)
> > if (devname[nla_len(info->attrs[IEEE802154_ATTR_DEV_NAME]) - 1]
> > != '\0')
> > return -EINVAL; /* phy name should be null-terminated */
> > + name_assign_type = NET_NAME_USER;
> > } else {
> > devname = "wpan%d";
> > + name_assign_type = NET_NAME_ENUM;
> > }
> >
> > if (strlen(devname) >= IFNAMSIZ)
>
> Just wondering what should happen if "%d" appears in a user provided name.
>
I tested it. If I use a name like "foobar%d" then I get a foobar0,
foobar1 ... foobarX.
> That would seem to be both USER and ENUM.
>
yes.
- Alex
------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
next prev parent reply other threads:[~2014-07-18 8:18 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-17 8:06 [PATCH net-next v9 0/9] net: set the correct name_assign_type for more devices Tom Gundersen
2014-07-17 8:06 ` [PATCH net-next v9 1/9] net: set name assign type for names assigned using a static string Tom Gundersen
2014-07-17 8:06 ` [PATCH net-next v9 2/9] net: nl80211 - make rdev_add_virtual_intf take name_assign_type Tom Gundersen
2014-07-17 9:04 ` Johannes Berg
2014-07-17 9:16 ` Tom Gundersen
2014-07-17 9:23 ` Johannes Berg
2014-07-17 8:06 ` [PATCH net-next v9 3/9] net: nl802154 - make add_iface take name assign type Tom Gundersen
2014-07-17 23:19 ` David Miller
2014-07-17 23:19 ` David Miller
2014-07-18 8:18 ` Alexander Aring [this message]
2014-07-18 8:18 ` Alexander Aring
2014-07-18 8:29 ` David Laight
2014-07-18 8:41 ` Tom Gundersen
2014-07-17 8:06 ` [PATCH net-next v9 4/9] net: set name_assign_type when setting names via ioctls Tom Gundersen
2014-07-17 23:20 ` David Miller
2014-07-18 8:59 ` Tom Gundersen
2014-07-17 8:06 ` [PATCH net-next v9 5/9] net: bond - make bond_create take name_assign_type Tom Gundersen
2014-07-17 8:06 ` [PATCH net-next v9 6/9] net: isdn - set name assign type Tom Gundersen
2014-07-17 8:06 ` [PATCH net-next v9 7/9] net: vlan " Tom Gundersen
2014-07-17 8:06 ` [PATCH net-next v9 8/9] net: openvswitch " Tom Gundersen
2014-07-17 18:22 ` Pravin Shelar
2014-07-17 18:22 ` Pravin Shelar
2014-07-17 8:06 ` [PATCH net-next v9 9/9] net: ppp " Tom Gundersen
2014-07-17 8:06 ` 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=20140718081810.GA6555@omega \
--to=alex.aring@gmail.com \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-zigbee-devel@lists.sourceforge.net \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.