aboutsummaryrefslogtreecommitdiffstats
path: root/net/phonet/af_phonet.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/phonet/af_phonet.c')
-rw-r--r--net/phonet/af_phonet.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/phonet/af_phonet.c b/net/phonet/af_phonet.c
index f400ff168904..62af1d8a8dd2 100644
--- a/net/phonet/af_phonet.c
+++ b/net/phonet/af_phonet.c
@@ -148,8 +148,8 @@ static int pn_send(struct sk_buff *skb, struct net_device *dev,
148 struct phonethdr *ph; 148 struct phonethdr *ph;
149 int err; 149 int err;
150 150
151 if (skb->len + 2 > 0xffff) { 151 if (skb->len + 2 > 0xffff /* Phonet length field limit */ ||
152 /* Phonet length field would overflow */ 152 skb->len + sizeof(struct phonethdr) > dev->mtu) {
153 err = -EMSGSIZE; 153 err = -EMSGSIZE;
154 goto drop; 154 goto drop;
155 } 155 }