summaryrefslogtreecommitdiff
path: root/net/phonet/af_phonet.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-11-18 20:37:07 (GMT)
committerIngo Molnar <mingo@elte.hu>2008-11-18 20:37:07 (GMT)
commit5177dc3f2b3220b2dcfcf35eb9e6ec53ee818231 (patch)
tree29dd80a7b33426d0890aa07b5864224557c62af7 /net/phonet/af_phonet.c
parent0bb943c7a2136716757a263f604d26309fd98042 (diff)
parent7f0f598a0069d1ab072375965a4b69137233169c (diff)
downloadlinux-fsl-qoriq-5177dc3f2b3220b2dcfcf35eb9e6ec53ee818231.tar.xz
Merge branch 'linus' into tracing/urgent
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 defeb7a..7ab30f6 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;
}