We don't handle the DAC bit currently, so I add a warning and drop the package.
Signed-off-by: Alexander Aring <alex.ar...@gmail.com> --- net/ieee802154/6lowpan.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c index 7062dad..80f6f7b 100644 --- a/net/ieee802154/6lowpan.c +++ b/net/ieee802154/6lowpan.c @@ -967,22 +967,24 @@ lowpan_process_data(struct sk_buff *skb) /* Extract DAM to the tmp variable */ tmp = ((iphc1 & LOWPAN_IPHC_DAM_11) >> LOWPAN_IPHC_DAM_BIT) & 0x03; - /* check for Multicast Compression */ - if (iphc1 & LOWPAN_IPHC_M) { - if (iphc1 & LOWPAN_IPHC_DAC) { - pr_debug("dest: context-based mcast compression\n"); - /* TODO: implement this */ - } else { + if (iphc1 & LOWPAN_IPHC_DAC) { + /* TODO: implement this */ + netdev_warn(skb->dev, "DAC bit is set. Context-based not implemented. Drop packet.\n"); + goto drop; + } else { + /* check for Multicast Compression */ + if (iphc1 & LOWPAN_IPHC_M) { err = lowpan_uncompress_multicast_daddr( skb, &hdr.daddr, tmp); if (err) goto drop; + } else { + pr_debug("dest: stateless compression\n"); + err = lowpan_uncompress_addr( + skb, &hdr.daddr, tmp, _daddr); + if (err) + goto drop; } - } else { - pr_debug("dest: stateless compression\n"); - err = lowpan_uncompress_addr(skb, &hdr.daddr, tmp, _daddr); - if (err) - goto drop; } /* UDP data uncompression */ -- 1.8.3.3 ------------------------------------------------------------------------------ See everything from the browser to the database with AppDynamics Get end-to-end visibility with application monitoring from AppDynamics Isolate bottlenecks and diagnose root cause in seconds. Start your free trial of AppDynamics Pro today! http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk _______________________________________________ Linux-zigbee-devel mailing list Linux-zigbee-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-zigbee-devel