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:17:13 +0000 (13:17 +0200)
commit791a7493d702b86899ee2df94cfee2e09b309da6
tree6b29c77b6fba148899f3a3a3729825cd523dc8fc
parent5a9059bad1cd0de6bfbcc0d5bb18bca9d454b782
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