projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
eb7c3ad
)
Phonet: refuse to send bigger than MTU packets
author
Rémi Denis-Courmont
<remi.denis-courmont@nokia.com>
Mon, 17 Nov 2008 03:48:49 +0000
(19:48 -0800)
committer
David S. Miller
<davem@davemloft.net>
Mon, 17 Nov 2008 03:48:49 +0000
(19:48 -0800)
Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/phonet/af_phonet.c
patch
|
blob
|
history
diff --git
a/net/phonet/af_phonet.c
b/net/phonet/af_phonet.c
index defeb7a0d502ab92dcc7253f0f97e10ae341209e..7ab30f668b5a8226a6342118c96322e33f04a0c4 100644
(file)
--- 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;
}