提交 8790404d 编写于 作者: A Alexander Aring 提交者: Marcel Holtmann

6lowpan: iphc: fix stateful multicast compression

In case of multicast address we need to set always the LOWPAN_IPHC_M bit
and if a destination context identifier was found for a multicast
address then we need to set the LOWPAN_IPHC_DAC as well.
Signed-off-by: NAlexander Aring <aar@pengutronix.de>
Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
上级 ebba380c
...@@ -1118,12 +1118,13 @@ int lowpan_header_compress(struct sk_buff *skb, const struct net_device *dev, ...@@ -1118,12 +1118,13 @@ int lowpan_header_compress(struct sk_buff *skb, const struct net_device *dev,
/* destination address compression */ /* destination address compression */
if (ipv6_daddr_type & IPV6_ADDR_MULTICAST) { if (ipv6_daddr_type & IPV6_ADDR_MULTICAST) {
pr_debug("destination address is multicast: "); pr_debug("destination address is multicast: ");
iphc1 |= LOWPAN_IPHC_M;
if (dci) { if (dci) {
iphc1 |= lowpan_iphc_mcast_ctx_addr_compress(&hc_ptr, iphc1 |= lowpan_iphc_mcast_ctx_addr_compress(&hc_ptr,
&dci_entry, &dci_entry,
&hdr->daddr); &hdr->daddr);
iphc1 |= LOWPAN_IPHC_DAC;
} else { } else {
iphc1 |= LOWPAN_IPHC_M;
iphc1 |= lowpan_iphc_mcast_addr_compress(&hc_ptr, iphc1 |= lowpan_iphc_mcast_addr_compress(&hc_ptr,
&hdr->daddr); &hdr->daddr);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册