On Jul 12, 2013, at 7:33 AM 7/12/13, Alexander Aring <alex.ar...@gmail.com> wrote:
> Pointers _saddr and _daddr points to source and destination address. > Use this for a link-layer compression to get these addresses. > > Signed-off-by: Alexander Aring <alex.ar...@gmail.com> > --- > net/ieee802154/6lowpan.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c > index 4f35d9a..ec4bf29 100644 > --- a/net/ieee802154/6lowpan.c > +++ b/net/ieee802154/6lowpan.c > @@ -919,7 +919,7 @@ lowpan_process_data(struct sk_buff *skb) > /* Source address uncompression */ > pr_debug("source address stateless compression\n"); > err = lowpan_uncompress_addr(skb, &hdr.saddr, lowpan_llprefix, > - lowpan_unc_llconf[tmp], skb->data); > + lowpan_unc_llconf[tmp], _saddr); > if (err) > goto drop; > > @@ -948,7 +948,7 @@ lowpan_process_data(struct sk_buff *skb) > } else { > pr_debug("dest: stateless compression\n"); > err = lowpan_uncompress_addr(skb, &hdr.daddr, lowpan_llprefix, > - lowpan_unc_llconf[tmp], skb->data); > + lowpan_unc_llconf[tmp], _daddr); > if (err) > goto drop; > } > -- > 1.8.3.2 > Working from memory, this fix looks correct. As a heads up, check out the fragment reassembly code, which (if I recall correctly) needs to be fixed to copy _daddr and _saddr from th first fragment into the reassembly buffer. Also working from memory - sorry, I don't have easy access to the latest commits to net-next - you might want to consider a couple of comment fixes and renaming llconf for consistency with what the code is doing: /* * Uncompression of stateless unicast: * 0 -> 16 bytes from packet * 1 -> link-local prefix, zero-fill, IID from packet * 2 -> link-local prefix, zero-fill, IID == 0000:00ff:fe00:XXXX, * XXXX from packet * 3 -> link-local prefix, zero-fill, IID derived from MAC * * NOTE: => the uncompress function does change 0xf to 0x10 */ static const u8 lowpan_unc_slconf[] = {0x0f, 0x28, 0x22, 0x20}; /* * Uncompression of ctx-based: * 0 -> All zeroes [unspecified / reserved] * 1 -> 8 bytes of prefix from context, IID from packet * 2 -> 8 bytes of prefix from context, zero-fill, 2 bytes of IID from packet * 3 -> 8 bytes of prefix from context, IID derived from MAC */ static const u8 lowpan_unc_ctxconf[] = {0x00, 0x88, 0x82, 0x80}; /* * Uncompression of stateless multicast: * 0 -> 16 bytes from packet * 1 -> prefix scope from packet, zero-fill, 5 bytes of IID from packet * 2 -> prefix scope from packet, zero-fill, 3 bytes of IID from packet * 3 -> link-local scope, zero-fill, 1 byte of IID from packet */ static const u8 lowpan_unc_mxconf[] = {0x0f, 0x25, 0x23, 0x21}; ------------------------------------------------------------------------------ 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