From b6f82fc05da4d21d03e6171202d8cf181f4da053 Mon Sep 17 00:00:00 2001 From: Alexander Aring Date: Sun, 2 Mar 2014 08:09:35 +0100 Subject: [PATCH] 6lowpan: use memcpy to set tag value in fraghdr Signed-off-by: Alexander Aring Signed-off-by: David S. Miller --- net/ieee802154/6lowpan_rtnl.c | 3 +-- 1 file changed, 1 insertion(+), 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) /* first fragment header */ head[0] = LOWPAN_DISPATCH_FRAG1 | ((dgram_size >> 8) & 0x7); head[1] = dgram_size & 0xff; - head[2] = tag >> 8; - head[3] = tag & 0xff; + memcpy(head + 2, &tag, sizeof(tag)); /* calc the nearest payload length(divided to 8) for first fragment * which fits into a IEEE802154_MTU -- GitLab