diff options
author | Alexander Aring <aar@pengutronix.de> | 2016-02-24 12:01:03 +0100 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2016-02-24 16:14:30 +0100 |
commit | 8790404de0e5f47ef721e2ed36ebb0f2314722ac (patch) | |
tree | f5264b2901cef1b2c549d3b08a92692cc4442d3f | |
parent | ebba380cc94689e372387aa7f63c063a3663e846 (diff) | |
download | linux-8790404de0e5f47ef721e2ed36ebb0f2314722ac.tar.bz2 |
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: Alexander Aring <aar@pengutronix.de>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
-rw-r--r-- | net/6lowpan/iphc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/6lowpan/iphc.c b/net/6lowpan/iphc.c index d2a565cde4f4..8dd8388c8eba 100644 --- a/net/6lowpan/iphc.c +++ b/net/6lowpan/iphc.c @@ -1118,12 +1118,13 @@ int lowpan_header_compress(struct sk_buff *skb, const struct net_device *dev, /* destination address compression */ if (ipv6_daddr_type & IPV6_ADDR_MULTICAST) { pr_debug("destination address is multicast: "); + iphc1 |= LOWPAN_IPHC_M; if (dci) { iphc1 |= lowpan_iphc_mcast_ctx_addr_compress(&hc_ptr, &dci_entry, &hdr->daddr); + iphc1 |= LOWPAN_IPHC_DAC; } else { - iphc1 |= LOWPAN_IPHC_M; iphc1 |= lowpan_iphc_mcast_addr_compress(&hc_ptr, &hdr->daddr); } |