Thread (18 messages) 18 messages, 4 authors, 2017-03-02

Re: [PATCH 1/2] mac80211_hwsim: Make sure NEW_RADIO contains final name

From: Johannes Berg <johannes@sipsolutions.net>
Date: 2017-02-27 16:08:43

quoted
        [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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help