diff --git a/net/phonet/af_phonet.c b/net/phonet/af_phonet.c index defeb7a0d502ab92dcc7253f0f97e10ae341209e..7ab30f668b5a8226a6342118c96322e33f04a0c4 100644 --- a/net/phonet/af_phonet.c +++ b/net/phonet/af_phonet.c @@ -144,8 +144,8 @@ static int pn_send(struct sk_buff *skb, struct net_device *dev, struct phonethdr *ph; int err; - if (skb->len + 2 > 0xffff) { - /* Phonet length field would overflow */ + if (skb->len + 2 > 0xffff /* Phonet length field limit */ || + skb->len + sizeof(struct phonethdr) > dev->mtu) { err = -EMSGSIZE; goto drop; }