Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

nl802154: add missing attribute validation

Add missing attribute validation for several u8 types.

Fixes: 2c21d11518b6 ("net: add NL802154 interface for configuration of 802.15.4 devices")
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Acked-by: Stefan Schmidt <stefan@datenfreihafen.org>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Jakub Kicinski and committed by
David S. Miller
9322cd7c 4c16d64e

+5
+5
net/ieee802154/nl_policy.c
··· 21 21 [IEEE802154_ATTR_HW_ADDR] = { .type = NLA_HW_ADDR, }, 22 22 [IEEE802154_ATTR_PAN_ID] = { .type = NLA_U16, }, 23 23 [IEEE802154_ATTR_CHANNEL] = { .type = NLA_U8, }, 24 + [IEEE802154_ATTR_BCN_ORD] = { .type = NLA_U8, }, 25 + [IEEE802154_ATTR_SF_ORD] = { .type = NLA_U8, }, 26 + [IEEE802154_ATTR_PAN_COORD] = { .type = NLA_U8, }, 27 + [IEEE802154_ATTR_BAT_EXT] = { .type = NLA_U8, }, 28 + [IEEE802154_ATTR_COORD_REALIGN] = { .type = NLA_U8, }, 24 29 [IEEE802154_ATTR_PAGE] = { .type = NLA_U8, }, 25 30 [IEEE802154_ATTR_COORD_SHORT_ADDR] = { .type = NLA_U16, }, 26 31 [IEEE802154_ATTR_COORD_HW_ADDR] = { .type = NLA_HW_ADDR, },