From: Alexander Aring <alex.aring@gmail.com>
To: linux-bluetooth@vger.kernel.org
Cc: marcel@holtmann.org, linux-wpan@vger.kernel.org,
kernel@pengutronix.de, Alexander Aring <alex.aring@gmail.com>
Subject: [PATCH bluetooth 4/5] ieee802154: 6lowpan: ensure of sending 1280 packets
Date: Tue, 19 Aug 2014 11:03:02 +0200 [thread overview]
Message-ID: <1408438983-13892-5-git-send-email-alex.aring@gmail.com> (raw)
In-Reply-To: <1408438983-13892-1-git-send-email-alex.aring@gmail.com>
This patch changes the 1281 MTU to 1280. Others stack have only a 1280
byte array for uncompressed 6LoWPAN packets, this avoid that these
stacks have an overflow. Sending 1281 uncompressed 6LoWPAN packets isn't
also rfc complaint.
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
---
net/ieee802154/6lowpan_rtnl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ieee802154/6lowpan_rtnl.c b/net/ieee802154/6lowpan_rtnl.c
index 71fa7d4..6591d27 100644
--- a/net/ieee802154/6lowpan_rtnl.c
+++ b/net/ieee802154/6lowpan_rtnl.c
@@ -437,7 +437,7 @@ static void lowpan_setup(struct net_device *dev)
/* Frame Control + Sequence Number + Address fields + Security Header */
dev->hard_header_len = 2 + 1 + 20 + 14;
dev->needed_tailroom = 2; /* FCS */
- dev->mtu = 1281;
+ dev->mtu = IPV6_MIN_MTU;
dev->tx_queue_len = 0;
dev->flags = IFF_BROADCAST | IFF_MULTICAST;
dev->watchdog_timeo = 0;
--
2.0.3
next prev parent reply other threads:[~2014-08-19 9:03 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-19 9:02 [PATCH bluetooth 0/5] mac802154: ieee802154: stable patches Alexander Aring
2014-08-19 9:02 ` [PATCH bluetooth 1/5] mac802154: fixed potential skb leak with mac802154_parse_frame_start Alexander Aring
2014-08-19 9:03 ` [PATCH bluetooth 2/5] ieee802154: 6lowpan_rtnl: fix correct errno value Alexander Aring
2014-08-19 9:03 ` [PATCH bluetooth 3/5] ieee802154: mac802154: handle the reserved dest mode by dropping the packet Alexander Aring
2014-08-19 9:03 ` Alexander Aring [this message]
2014-08-19 9:03 ` [PATCH bluetooth 5/5] ieee802154: 6lowpan: ensure MTU of 1280 for 6lowpan Alexander Aring
2014-08-19 16:44 ` [PATCH bluetooth 0/5] mac802154: ieee802154: stable patches Marcel Holtmann
2014-08-19 16:51 ` Alexander Aring
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1408438983-13892-5-git-send-email-alex.aring@gmail.com \
--to=alex.aring@gmail.com \
--cc=kernel@pengutronix.de \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-wpan@vger.kernel.org \
--cc=marcel@holtmann.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).