diff options
author | Alexander Aring <alex.aring@gmail.com> | 2014-03-02 02:09:35 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-03-02 19:19:44 -0500 |
commit | b6f82fc05da4d21d03e6171202d8cf181f4da053 (patch) | |
tree | b70506fc095825b4ae6eb602c773c7405e18229e /net/ieee802154 | |
parent | 0234a632486eade1094736a03db9b8fa4dd4d125 (diff) |
6lowpan: use memcpy to set tag value in fraghdr
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ieee802154')
-rw-r--r-- | net/ieee802154/6lowpan_rtnl.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/ieee802154/6lowpan_rtnl.c b/net/ieee802154/6lowpan_rtnl.c index 178ffb97816b..e4726180fc36 100644 --- a/net/ieee802154/6lowpan_rtnl.c +++ b/net/ieee802154/6lowpan_rtnl.c | |||
@@ -265,8 +265,7 @@ lowpan_skb_fragmentation(struct sk_buff *skb, struct net_device *dev) | |||
265 | /* first fragment header */ | 265 | /* first fragment header */ |
266 | head[0] = LOWPAN_DISPATCH_FRAG1 | ((dgram_size >> 8) & 0x7); | 266 | head[0] = LOWPAN_DISPATCH_FRAG1 | ((dgram_size >> 8) & 0x7); |
267 | head[1] = dgram_size & 0xff; | 267 | head[1] = dgram_size & 0xff; |
268 | head[2] = tag >> 8; | 268 | memcpy(head + 2, &tag, sizeof(tag)); |
269 | head[3] = tag & 0xff; | ||
270 | 269 | ||
271 | /* calc the nearest payload length(divided to 8) for first fragment | 270 | /* calc the nearest payload length(divided to 8) for first fragment |
272 | * which fits into a IEEE802154_MTU | 271 | * which fits into a IEEE802154_MTU |