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>
This commit is contained in:
Alexander Aring 2014-03-02 08:09:35 +01:00 коммит произвёл David S. Miller
Родитель 0234a63248
Коммит b6f82fc05d
1 изменённых файлов: 1 добавлений и 2 удалений

Просмотреть файл

@ -265,8 +265,7 @@ lowpan_skb_fragmentation(struct sk_buff *skb, struct net_device *dev)
/* first fragment header */ /* first fragment header */
head[0] = LOWPAN_DISPATCH_FRAG1 | ((dgram_size >> 8) & 0x7); head[0] = LOWPAN_DISPATCH_FRAG1 | ((dgram_size >> 8) & 0x7);
head[1] = dgram_size & 0xff; head[1] = dgram_size & 0xff;
head[2] = tag >> 8; memcpy(head + 2, &tag, sizeof(tag));
head[3] = tag & 0xff;
/* calc the nearest payload length(divided to 8) for first fragment /* calc the nearest payload length(divided to 8) for first fragment
* which fits into a IEEE802154_MTU * which fits into a IEEE802154_MTU