]> git.baikalelectronics.ru Git - kernel.git/commit
net: ieee802154: return -EINVAL for unknown addr type
authorAlexander Aring <aahringo@redhat.com>
Thu, 6 Oct 2022 02:02:37 +0000 (22:02 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Oct 2022 11:22:59 +0000 (13:22 +0200)
commiteedc60eead1f842b495ac4e679a16266247b5751
treefd6e3330fba747bbd3370a4d1f72862aab6be079
parentf64ccef310bce65c4bef06ebab62cefedce8671b
net: ieee802154: return -EINVAL for unknown addr type

commit d2b6663db7651144fa04838e83829337b911a894 upstream.

This patch adds handling to return -EINVAL for an unknown addr type. The
current behaviour is to return 0 as successful but the size of an
unknown addr type is not defined and should return an error like -EINVAL.

Fixes: 891afbcca1ec ("net/ieee802154: fix uninit value bug in dgram_sendmsg")
Signed-off-by: Alexander Aring <aahringo@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/net/ieee802154_netdev.h