linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Andrew Zaborowski <andrew.zaborowski@intel.com>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [PATCH 1/2] mac80211_hwsim: Make sure NEW_RADIO contains final name
Date: Mon, 27 Feb 2017 17:08:39 +0100	[thread overview]
Message-ID: <1488211719.28431.22.camel@sipsolutions.net> (raw)
In-Reply-To: <CAOq732L0wT+HMouihfSYu4hwxy=fh6pieMY3r2DOO1tVXxqw1A@mail.gmail.com> (sfid-20170227_161634_708693_90859E55)


> >         [HWSIM_ATTR_RADIO_NAME] = { .type = NLA_STRING },
> > 
> > enforces that a NUL byte *must* be present when userspace gives us
> > the
> > information, so we're save - just asymmetric.
> 
> It seems that would be NLA_NUL_STRING, whlie for NLA_STRING it's
> optional, 

Oops. I indeed misread the code there.

> I know because I didn't add the NUL in my userspace and
> things still worked.

:)
Then you probably had some 0 padding or so.

> We can copy the received nla_data into a buffer
> and add the 0-byte there to support this as an option.

I'll do that.

johannes

      reply	other threads:[~2017-02-27 16:08 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-23 12:02 [PATCH 1/2] mac80211_hwsim: Make sure NEW_RADIO contains final name Andrew Zaborowski
2017-02-23 12:02 ` [PATCH 2/2][RFC] mac80211_hwsim: Report radio addresses in NEW_RADIO/GET_RADIO Andrew Zaborowski
2017-02-23 19:01   ` Benjamin Beichler
2017-02-24  0:02     ` Andrew Zaborowski
2017-02-24  0:25       ` Ben Greear
2017-02-27 13:27   ` Johannes Berg
2017-02-27 15:26     ` Andrew Zaborowski
2017-02-27 17:10       ` Ben Greear
2017-02-28  1:23         ` Andrew Zaborowski
2017-02-28  1:57           ` Ben Greear
2017-03-01 14:33             ` Benjamin Beichler
2017-03-01 15:35               ` Ben Greear
2017-03-01 17:04                 ` Benjamin Beichler
2017-03-02  8:23                   ` Johannes Berg
2017-02-24  0:08 ` [PATCH 1/2] mac80211_hwsim: Make sure NEW_RADIO contains final name Andrew Zaborowski
2017-02-27 13:24   ` Johannes Berg
2017-02-27 15:16     ` Andrew Zaborowski
2017-02-27 16:08       ` Johannes Berg [this message]

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=1488211719.28431.22.camel@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=andrew.zaborowski@intel.com \
    --cc=linux-wireless@vger.kernel.org \
    /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).