diff options
author | Rémi Denis-Courmont <remi.denis-courmont@nokia.com> | 2008-11-17 04:48:49 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-11-17 04:48:49 +0100 |
commit | ebfe92ca65c780334bdf847ddc4eca15835bd9c0 (patch) | |
tree | 6def944664e96f8394bcc9e268c5ee8e9d64ee16 /net/phonet | |
parent | e1000e: fix IPMI traffic (diff) | |
download | linux-ebfe92ca65c780334bdf847ddc4eca15835bd9c0.tar.xz linux-ebfe92ca65c780334bdf847ddc4eca15835bd9c0.zip |
Phonet: refuse to send bigger than MTU packets
Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/phonet')
-rw-r--r-- | net/phonet/af_phonet.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/phonet/af_phonet.c b/net/phonet/af_phonet.c index defeb7a0d502..7ab30f668b5a 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; } |