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:25:55 +0000 (13:25 +0200)
commitdc54ff9fc4a4886f4cd409054c6505ca352a146a
tree6f57a1c8d5d495526868ce425b314dad4c95e0fc
parent45c33966759ea1b4040c08dacda99ef623c0ca29
net: ieee802154: return -EINVAL for unknown addr type

commit 30393181fdbc1608cc683b4ee99dcce05ffcc8c7 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: 94160108a70c ("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