Re: [RFC] remove NLA_STRING NUL trimming

2007-03-23 Thread Thomas Graf
* Johannes Berg [EMAIL PROTECTED] 2007-03-23 00:12 Looking through the netlink/attr.c code I noticed that NLA_STRING attributes that end with a binary NUL have it removed before passing it to the consumer. It's not really removed, the trailing NUL is just ignored when checking the length of

Re: [RFC] remove NLA_STRING NUL trimming

2007-03-23 Thread Johannes Berg
On Fri, 2007-03-23 at 15:20 +0100, Thomas Graf wrote: It's not really removed, the trailing NUL is just ignored when checking the length of the attribute. Good point. This is needed for older netlink families where strings are not always NUL terminated, yet we still need to accept the

[RFC] remove NLA_STRING NUL trimming

2007-03-23 Thread Johannes Berg
Looking through the netlink/attr.c code I noticed that NLA_STRING attributes that end with a binary NUL have it removed before passing it to the consumer. For wireless, we have a few places where we need to be able to accept any (even binary) values, for example for the SSID; the SSID can validly