]> git.baikalelectronics.ru Git - kernel.git/commit
ieee802154: add proper length checks to header creations
authorPhoebe Buckheister <phoebe.buckheister@itwm.fraunhofer.de>
Fri, 14 Mar 2014 20:24:04 +0000 (21:24 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sat, 15 Mar 2014 02:15:26 +0000 (22:15 -0400)
commit7b036d19be936c6dd28798bf9e71c27720040f6a
tree9e132ac257c7f520382d7082e34ab3f5f1cc9452
parentd54add2221cc06ce0adda314e60aa08c82929ea2
ieee802154: add proper length checks to header creations

Have mac802154 header_ops.create fail with -EMSGSIZE if the length
passed will be too large to fit a frame. Since 6lowpan will ensure that
no packet payload will be too large, pass a length of 0 there. 802.15.4
dgram sockets will also return -EMSGSIZE on payloads larger than the
device MTU instead of -EINVAL.

Signed-off-by: Phoebe Buckheister <phoebe.buckheister@itwm.fraunhofer.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ieee802154/6lowpan_rtnl.c
net/ieee802154/dgram.c
net/mac802154/wpan.c