Re: [PATCH wpan-tools] mac: range checking for command accepting only 0 or 1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Aug 19, 2015 at 05:27:01PM +0200, Stefan Schmidt wrote:
> The problem is with lbt and and autoreq_default which are boolean. We accept
> things like 400 just fine here and bring it down to 1.
> I'm going to fix this in nl802154 and leave it out of wpan-tools.
> 

We finally has the result that the userspace need to convert the value
then which is "unsigned long" and the netlink command requires "U8" or
"U16".

Then the command need check the range when it's U8:

0x00 - 0xff

and when it's U16:

0x0000 - 0xffff

The rest of ranges checks will do the kernel then. This will remove the
overflow in userspace e.g.

iwpan dev wpan0 set ackreq_default 256

will set the ackreq_default to 0. This check can't be done at
kernelspace side. The kernel need to check then if it's "0" or "1" only.

We need to introduce this behabiour for all U8 and U16 settings then.

- Alex
--
To unsubscribe from this list: send the line "unsubscribe linux-wpan" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux