summaryrefslogtreecommitdiff
path: root/drivers/net/ppp_generic.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-09-22 00:35:00 +0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-09-22 00:35:00 +0400
commite5b26a88f13dfe3162acd50490c0c8504af81b26 (patch)
treee2e52996c76dcb6236396f3686a7b4fd6e475405 /drivers/net/ppp_generic.c
parentfed678dc8a8b839c8189b5d889a94e865cd327dd (diff)
parentbcf66bf54aabffc150acd1c99e0f4bc51935eada (diff)
downloadlinux-e5b26a88f13dfe3162acd50490c0c8504af81b26.tar.xz
Merge git://github.com/davem330/net
* git://github.com/davem330/net: (27 commits) xfrm: Perform a replay check after return from async codepaths fib:fix BUG_ON in fib_nl_newrule when add new fib rule ixgbe: fix possible null buffer error tg3: fix VLAN tagging regression net: pxa168: Fix build errors by including interrupt.h netconsole: switch init_netconsole() to late_initcall gianfar: Fix overflow check and return value for gfar_get_cls_all() ppp_generic: fix multilink fragment MTU calculation (again) GRETH: avoid overwrite IP-stack's IP-frags checksum GRETH: RX/TX bytes were never increased ipv6: fix a possible double free b43: Fix beacon problem in ad-hoc mode Bluetooth: add support for 2011 mac mini Bluetooth: Add MacBookAir4,1 support Bluetooth: Fixed BT ST Channel reg order r8169: do not enable the TBI for anything but the original 8169. r8169: remove erroneous processing of always set bit. r8169: fix WOL setting for 8105 and 8111evl r8169: add MODULE_FIRMWARE for the firmware of 8111evl r8169: fix the reset setting for 8111evl ...
Diffstat (limited to 'drivers/net/ppp_generic.c')
-rw-r--r--drivers/net/ppp_generic.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/net/ppp_generic.c b/drivers/net/ppp_generic.c
index 10e5d985afa3..edfa15d2e795 100644
--- a/drivers/net/ppp_generic.c
+++ b/drivers/net/ppp_generic.c
@@ -1465,7 +1465,12 @@ static int ppp_mp_explode(struct ppp *ppp, struct sk_buff *skb)
continue;
}
- mtu = pch->chan->mtu - hdrlen;
+ /*
+ * hdrlen includes the 2-byte PPP protocol field, but the
+ * MTU counts only the payload excluding the protocol field.
+ * (RFC1661 Section 2)
+ */
+ mtu = pch->chan->mtu - (hdrlen - 2);
if (mtu < 4)
mtu = 4;
if (flen > mtu)