diff --git a/net/mac802154/wpan.c b/net/mac802154/wpan.c index 1df7a6a573865b4add87261300cc1d7ff01fa243..cb34064d05f6197bffeedbac12daa4e804546c7b 100644 --- a/net/mac802154/wpan.c +++ b/net/mac802154/wpan.c @@ -231,7 +231,7 @@ static int mac802154_header_create(struct sk_buff *skb, skb_reset_mac_header(skb); skb->mac_len = hlen; - if (hlen + len + 2 > dev->mtu) + if (len > ieee802154_max_payload(&hdr)) return -EMSGSIZE; return hlen;