On Jul 15, 2013, at 9:27 PM 7/15/13, Alexander Aring <alex.ar...@gmail.com> wrote:
> Some protocolls has a unspecific address as source address like > "Multicast Listener Report Message v2" or "Neighbor Soliciation" > decode the SAC bit as :: address. I read RFC 6282 as specifying unspecified address with SAC == 1, SAM == 00. Relevant code snippet from my other stack: switch (ihc1 >> 4 & 7) { /* snip */ case 4: /* SAC == 1, SAM == 0 */ memset (iptr->net_ipsrc, 0, 16); break; case 5: /* SAC == 1, SAM == 1 */ /* Context and 64 bits inline */ #ifdef DEBUG_RADIO kprintf("no context-based address compression\n"); #endif bptr += 8; break; /* snip */ - Ralph > > The header create part set this bit when a :: address is used. > > Signed-off-by: Alexander Aring <alex.ar...@gmail.com> > --- > net/ieee802154/6lowpan.c | 15 ++++++++++----- > 1 file changed, 10 insertions(+), 5 deletions(-) > > diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c > index 80f6f7b..197185c 100644 > --- a/net/ieee802154/6lowpan.c > +++ b/net/ieee802154/6lowpan.c > @@ -958,11 +958,16 @@ lowpan_process_data(struct sk_buff *skb) > /* Extract SAM to the tmp variable */ > tmp = ((iphc1 & LOWPAN_IPHC_SAM) >> LOWPAN_IPHC_SAM_BIT) & 0x03; > > - /* Source address uncompression */ > - pr_debug("source address stateless compression\n"); > - err = lowpan_uncompress_addr(skb, &hdr.saddr, tmp, _saddr); > - if (err) > - goto drop; > + if (iphc1 & LOWPAN_IPHC_SAC) { > + /* TODO: implement this */ > + pr_debug("SAC bit is set. Set source address to: ::.\n"); > + } else { > + /* Source address uncompression */ > + pr_debug("source address stateless compression\n"); > + err = lowpan_uncompress_addr(skb, &hdr.saddr, tmp, _saddr); > + if (err) > + goto drop; > + } > > /* Extract DAM to the tmp variable */ > tmp = ((iphc1 & LOWPAN_IPHC_DAM_11) >> LOWPAN_IPHC_DAM_BIT) & 0x03; > -- > 1.8.3.2 > > > ------------------------------------------------------------------------------ > 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 ------------------------------------------------------------------------------ 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