summaryrefslogtreecommitdiffstats
path: root/net/phonet
diff options
context:
space:
mode:
authorDavid S. Miller2008-11-19 08:38:23 +0100
committerDavid S. Miller2008-11-19 08:38:23 +0100
commit198d6ba4d7f48c94f990f4604f0b3d73925e0ded (patch)
tree56bbdf8ba2553c23c8099da9344a8f1d1aba97ab /net/phonet
parentnet: sctp should update its inuse counter (diff)
parentMerge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block (diff)
downloadkernel-qcow2-linux-198d6ba4d7f48c94f990f4604f0b3d73925e0ded.tar.gz
kernel-qcow2-linux-198d6ba4d7f48c94f990f4604f0b3d73925e0ded.tar.xz
kernel-qcow2-linux-198d6ba4d7f48c94f990f4604f0b3d73925e0ded.zip
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts: drivers/isdn/i4l/isdn_net.c fs/cifs/connect.c
Diffstat (limited to 'net/phonet')
-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,
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;
}