Skip to content

Commit 9dde130

Browse files
Alexander AringStefan-Schmidt
authored andcommitted
net: ieee802154: forbid monitor for del llsec seclevel
This patch forbids to del llsec seclevel for monitor interfaces which we don't support yet. Otherwise we will access llsec mib which isn't initialized for monitors. Reported-by: [email protected] Signed-off-by: Alexander Aring <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Stefan Schmidt <[email protected]>
1 parent 9ec87e3 commit 9dde130

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

net/ieee802154/nl802154.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2133,6 +2133,9 @@ static int nl802154_del_llsec_seclevel(struct sk_buff *skb,
21332133
struct wpan_dev *wpan_dev = dev->ieee802154_ptr;
21342134
struct ieee802154_llsec_seclevel sl;
21352135

2136+
if (wpan_dev->iftype == NL802154_IFTYPE_MONITOR)
2137+
return -EOPNOTSUPP;
2138+
21362139
if (!info->attrs[NL802154_ATTR_SEC_LEVEL] ||
21372140
llsec_parse_seclevel(info->attrs[NL802154_ATTR_SEC_LEVEL],
21382141
&sl) < 0)

0 commit comments

Comments
 (0)