[Linux-zigbee-devel] [PATCH net-next 5/6] 6lowpan: udp use lowpan_fetch_skb function
Cleanup the lowpan_uncompress_udp_header function to use the lowpan_fetch_skb function. Signed-off-by: Alexander Aring --- net/ieee802154/6lowpan.c | 40 ++-- 1 file changed, 18 insertions(+), 22 deletions(-) diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c index 59678da..6d7f253 100644 --- a/net/ieee802154/6lowpan.c +++ b/net/ieee802154/6lowpan.c @@ -405,40 +405,34 @@ static inline int lowpan_fetch_skb_u16(struct sk_buff *skb, u16 *val) static int lowpan_uncompress_udp_header(struct sk_buff *skb, struct udphdr *uh) { - u8 tmp; - - if (!uh) - goto err; + bool fail; + u8 tmp = 0, val = 0; - if (lowpan_fetch_skb_u8(skb, &tmp)) - goto err; + fail = lowpan_fetch_skb(skb, &tmp, 1); if ((tmp & LOWPAN_NHC_UDP_MASK) == LOWPAN_NHC_UDP_ID) { pr_debug("UDP header uncompression\n"); switch (tmp & LOWPAN_NHC_UDP_CS_P_11) { case LOWPAN_NHC_UDP_CS_P_00: - memcpy(&uh->source, &skb->data[0], 2); - memcpy(&uh->dest, &skb->data[2], 2); - skb_pull(skb, 4); + fail |= lowpan_fetch_skb(skb, &uh->source, 2); + fail |= lowpan_fetch_skb(skb, &uh->dest, 2); break; case LOWPAN_NHC_UDP_CS_P_01: - memcpy(&uh->source, &skb->data[0], 2); - uh->dest = htons(skb->data[2] + -LOWPAN_NHC_UDP_8BIT_PORT); - skb_pull(skb, 3); + fail |= lowpan_fetch_skb(skb, &uh->source, 2); + fail |= lowpan_fetch_skb(skb, &val, 1); + uh->dest = htons(val + LOWPAN_NHC_UDP_8BIT_PORT); break; case LOWPAN_NHC_UDP_CS_P_10: - uh->source = htons(skb->data[0] + - LOWPAN_NHC_UDP_8BIT_PORT); - memcpy(&uh->dest, &skb->data[1], 2); - skb_pull(skb, 3); + fail |= lowpan_fetch_skb(skb, &val, 1); + uh->source = htons(val + LOWPAN_NHC_UDP_8BIT_PORT); + fail |= lowpan_fetch_skb(skb, &uh->dest, 2); break; case LOWPAN_NHC_UDP_CS_P_11: + fail |= lowpan_fetch_skb(skb, &val, 1); uh->source = htons(LOWPAN_NHC_UDP_4BIT_PORT + - (skb->data[0] >> 4)); + (val >> 4)); uh->dest = htons(LOWPAN_NHC_UDP_4BIT_PORT + -(skb->data[0] & 0x0f)); - skb_pull(skb, 1); +(val & 0x0f)); break; default: pr_debug("ERROR: unknown UDP format\n"); @@ -453,8 +447,7 @@ lowpan_uncompress_udp_header(struct sk_buff *skb, struct udphdr *uh) pr_debug("checksum elided currently not supported"); goto err; } else { - memcpy(&uh->check, &skb->data[0], 2); - skb_pull(skb, 2); + fail |= lowpan_fetch_skb(skb, &uh->check, 2); } /* @@ -469,6 +462,9 @@ lowpan_uncompress_udp_header(struct sk_buff *skb, struct udphdr *uh) goto err; } + if (fail) + goto err; + return 0; err: return -EINVAL; -- 1.8.4.2 -- DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access Free app hosting. Or install the open source package on any LAMP server. Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native! http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk ___ Linux-zigbee-devel mailing list Linux-zigbee-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-zigbee-devel
[Linux-zigbee-devel] [PATCH net-next 0/6] 6lowpan: udp compression/uncompression fix
The current 6LoWPAN udp compression/uncompression is completely broken. This patch series fix a lot of udp compression/uncompression issues and add support parsing with lowpan_fetch_skb function. Alexander Aring (6): 6lowpan: fix udp nullpointer dereferencing 6lowpan: fix udp compress ordering 6lowpan: fix udp byte ordering 6lowpan: add udp warning for elided checksum 6lowpan: udp use lowpan_fetch_skb function 6lowpan: udp use subtraction on both conditions net/ieee802154/6lowpan.c | 80 +--- net/ieee802154/6lowpan.h | 1 + 2 files changed, 43 insertions(+), 38 deletions(-) -- 1.8.4.2 -- DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access Free app hosting. Or install the open source package on any LAMP server. Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native! http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk ___ Linux-zigbee-devel mailing list Linux-zigbee-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-zigbee-devel
[Linux-zigbee-devel] [PATCH net-next 6/6] 6lowpan: udp use subtraction on both conditions
Cleanup code to handle both calculation in the same way. Signed-off-by: Alexander Aring --- net/ieee802154/6lowpan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c index 6d7f253..d8e1456 100644 --- a/net/ieee802154/6lowpan.c +++ b/net/ieee802154/6lowpan.c @@ -346,7 +346,7 @@ lowpan_compress_udp_header(u8 **hc06_ptr, struct sk_buff *skb) **hc06_ptr = LOWPAN_NHC_UDP_CS_P_11; *(*hc06_ptr + 1) = /* subtraction is faster */ (u8)((ntohs(uh->dest) - LOWPAN_NHC_UDP_4BIT_PORT) + - ((ntohs(uh->source) & LOWPAN_NHC_UDP_4BIT_PORT) << 4)); + ((ntohs(uh->source) - LOWPAN_NHC_UDP_4BIT_PORT) << 4)); *hc06_ptr += 2; } else if ((ntohs(uh->dest) & LOWPAN_NHC_UDP_8BIT_MASK) == LOWPAN_NHC_UDP_8BIT_PORT) { -- 1.8.4.2 -- DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access Free app hosting. Or install the open source package on any LAMP server. Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native! http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk ___ Linux-zigbee-devel mailing list Linux-zigbee-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-zigbee-devel
[Linux-zigbee-devel] [PATCH net-next 2/6] 6lowpan: fix udp compress ordering
In case ((ntohs(uh->source) & LOWPAN_NHC_UDP_8BIT_MASK) the order of uncompression is wrong. It's always first source port then destination port as second. See: http://tools.ietf.org/html/rfc6282#section-4.3.3 "Fields carried in-line (in part or in whole) appear in the same order as they do in the UDP header format" Signed-off-by: Alexander Aring --- 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 8633379..ad6755a 100644 --- a/net/ieee802154/6lowpan.c +++ b/net/ieee802154/6lowpan.c @@ -359,8 +359,8 @@ lowpan_compress_udp_header(u8 **hc06_ptr, struct sk_buff *skb) LOWPAN_NHC_UDP_8BIT_PORT) { pr_debug("UDP header: remove 8 bits of source\n"); **hc06_ptr = LOWPAN_NHC_UDP_CS_P_10; - memcpy(*hc06_ptr + 1, &uh->dest, 2); - *(*hc06_ptr + 3) = (u8)(uh->source - LOWPAN_NHC_UDP_8BIT_PORT); + *(*hc06_ptr + 1) = (u8)(uh->source - LOWPAN_NHC_UDP_8BIT_PORT); + memcpy(*hc06_ptr + 2, &uh->dest, 2); *hc06_ptr += 4; } else { pr_debug("UDP header: can't compress\n"); -- 1.8.4.2 -- DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access Free app hosting. Or install the open source package on any LAMP server. Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native! http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk ___ Linux-zigbee-devel mailing list Linux-zigbee-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-zigbee-devel
[Linux-zigbee-devel] [PATCH net-next 3/6] 6lowpan: fix udp byte ordering
The incoming udp header in lowpan_compress_udp_header function is already in network byte order. Everytime we read this values for source and destination port we need to convert this value to host byte order. In the outcoming header we need to set this value in network byte order which the upcoming process assumes. Signed-off-by: Alexander Aring --- net/ieee802154/6lowpan.c | 41 ++--- 1 file changed, 22 insertions(+), 19 deletions(-) diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c index ad6755a..616f2f6 100644 --- a/net/ieee802154/6lowpan.c +++ b/net/ieee802154/6lowpan.c @@ -338,28 +338,30 @@ lowpan_compress_udp_header(u8 **hc06_ptr, struct sk_buff *skb) { struct udphdr *uh = udp_hdr(skb); - if (((uh->source & LOWPAN_NHC_UDP_4BIT_MASK) == - LOWPAN_NHC_UDP_4BIT_PORT) && - ((uh->dest & LOWPAN_NHC_UDP_4BIT_MASK) == - LOWPAN_NHC_UDP_4BIT_PORT)) { + if (((ntohs(uh->source) & LOWPAN_NHC_UDP_4BIT_MASK) == +LOWPAN_NHC_UDP_4BIT_PORT) && + ((ntohs(uh->dest) & LOWPAN_NHC_UDP_4BIT_MASK) == +LOWPAN_NHC_UDP_4BIT_PORT)) { pr_debug("UDP header: both ports compression to 4 bits\n"); **hc06_ptr = LOWPAN_NHC_UDP_CS_P_11; *(*hc06_ptr + 1) = /* subtraction is faster */ - (u8)((uh->dest - LOWPAN_NHC_UDP_4BIT_PORT) + - ((uh->source & LOWPAN_NHC_UDP_4BIT_PORT) << 4)); + (u8)((ntohs(uh->dest) - LOWPAN_NHC_UDP_4BIT_PORT) + + ((ntohs(uh->source) & LOWPAN_NHC_UDP_4BIT_PORT) << 4)); *hc06_ptr += 2; - } else if ((uh->dest & LOWPAN_NHC_UDP_8BIT_MASK) == + } else if ((ntohs(uh->dest) & LOWPAN_NHC_UDP_8BIT_MASK) == LOWPAN_NHC_UDP_8BIT_PORT) { pr_debug("UDP header: remove 8 bits of dest\n"); **hc06_ptr = LOWPAN_NHC_UDP_CS_P_01; memcpy(*hc06_ptr + 1, &uh->source, 2); - *(*hc06_ptr + 3) = (u8)(uh->dest - LOWPAN_NHC_UDP_8BIT_PORT); + *(*hc06_ptr + 3) = (u8)(ntohs(uh->dest) - + LOWPAN_NHC_UDP_8BIT_PORT); *hc06_ptr += 4; - } else if ((uh->source & LOWPAN_NHC_UDP_8BIT_MASK) == + } else if ((ntohs(uh->source) & LOWPAN_NHC_UDP_8BIT_MASK) == LOWPAN_NHC_UDP_8BIT_PORT) { pr_debug("UDP header: remove 8 bits of source\n"); **hc06_ptr = LOWPAN_NHC_UDP_CS_P_10; - *(*hc06_ptr + 1) = (u8)(uh->source - LOWPAN_NHC_UDP_8BIT_PORT); + *(*hc06_ptr + 1) = (u8)(ntohs(uh->source) - + LOWPAN_NHC_UDP_8BIT_PORT); memcpy(*hc06_ptr + 2, &uh->dest, 2); *hc06_ptr += 4; } else { @@ -421,20 +423,21 @@ lowpan_uncompress_udp_header(struct sk_buff *skb, struct udphdr *uh) break; case LOWPAN_NHC_UDP_CS_P_01: memcpy(&uh->source, &skb->data[0], 2); - uh->dest = - skb->data[2] + LOWPAN_NHC_UDP_8BIT_PORT; + uh->dest = htons(skb->data[2] + +LOWPAN_NHC_UDP_8BIT_PORT); skb_pull(skb, 3); break; case LOWPAN_NHC_UDP_CS_P_10: - uh->source = skb->data[0] + LOWPAN_NHC_UDP_8BIT_PORT; + uh->source = htons(skb->data[0] + + LOWPAN_NHC_UDP_8BIT_PORT); memcpy(&uh->dest, &skb->data[1], 2); skb_pull(skb, 3); break; case LOWPAN_NHC_UDP_CS_P_11: - uh->source = - LOWPAN_NHC_UDP_4BIT_PORT + (skb->data[0] >> 4); - uh->dest = - LOWPAN_NHC_UDP_4BIT_PORT + (skb->data[0] & 0x0f); + uh->source = htons(LOWPAN_NHC_UDP_4BIT_PORT + + (skb->data[0] >> 4)); + uh->dest = htons(LOWPAN_NHC_UDP_4BIT_PORT + +(skb->data[0] & 0x0f)); skb_pull(skb, 1); break; default: @@ -443,7 +446,7 @@ lowpan_uncompress_udp_header(struct sk_buff *skb, struct udphdr *uh) } pr_debug("uncompressed UDP ports: src = %d, dst = %d\n", -uh->source, uh->dest); +ntohs(uh->source), ntohs(uh->dest)); /* copy checksum */ memcpy(&uh->check, &skb->data[0], 2); @@ -455,7 +458,7 @@ lowpan_uncompress_udp_header(struct sk_buff *skb, struct udphdr *uh) * frame */
[Linux-zigbee-devel] [PATCH net-next 4/6] 6lowpan: add udp warning for elided checksum
Bit 5 of "UDP LOWPAN_NHC Format" indicate that the checksum can be elided. The host need to calculate the udp checksum afterwards but this isn't supported right now. See: http://tools.ietf.org/html/rfc6282#section-4.3.3 Signed-off-by: Alexander Aring --- net/ieee802154/6lowpan.c | 11 --- net/ieee802154/6lowpan.h | 1 + 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c index 616f2f6..59678da 100644 --- a/net/ieee802154/6lowpan.c +++ b/net/ieee802154/6lowpan.c @@ -448,9 +448,14 @@ lowpan_uncompress_udp_header(struct sk_buff *skb, struct udphdr *uh) pr_debug("uncompressed UDP ports: src = %d, dst = %d\n", ntohs(uh->source), ntohs(uh->dest)); - /* copy checksum */ - memcpy(&uh->check, &skb->data[0], 2); - skb_pull(skb, 2); + /* checksum */ + if (tmp & LOWPAN_NHC_UDP_CS_C) { + pr_debug("checksum elided currently not supported"); + goto err; + } else { + memcpy(&uh->check, &skb->data[0], 2); + skb_pull(skb, 2); + } /* * UDP lenght needs to be infered from the lower layers diff --git a/net/ieee802154/6lowpan.h b/net/ieee802154/6lowpan.h index 2869c05..2bc231f 100644 --- a/net/ieee802154/6lowpan.h +++ b/net/ieee802154/6lowpan.h @@ -231,6 +231,7 @@ #define LOWPAN_NHC_UDP_CS_P_10 0xF2 /* source = 0xF0 + 8bit inline, dest = 16 bit inline */ #define LOWPAN_NHC_UDP_CS_P_11 0xF3 /* source & dest = 0xF0B + 4bit inline */ +#define LOWPAN_NHC_UDP_CS_C0x04 /* checksum elided */ static inline bool lowpan_fetch_skb(struct sk_buff *skb, void *data, const unsigned int len) -- 1.8.4.2 -- DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access Free app hosting. Or install the open source package on any LAMP server. Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native! http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk ___ Linux-zigbee-devel mailing list Linux-zigbee-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-zigbee-devel
[Linux-zigbee-devel] [PATCH net-next 1/6] 6lowpan: fix udp nullpointer dereferencing
Sometimes a nullpointer dereferencing occurs because of using a wrong pointer arithmetic in udp_uncompression. This patch changes "**(hc06_ptr + 3)" to the right one "*(*hc06_ptr + 3)". Dereferencing like "**(hc06_ptr + 3)" works in a random case only. Signed-off-by: Alexander Aring --- net/ieee802154/6lowpan.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c index 426b5df..8633379 100644 --- a/net/ieee802154/6lowpan.c +++ b/net/ieee802154/6lowpan.c @@ -344,7 +344,7 @@ lowpan_compress_udp_header(u8 **hc06_ptr, struct sk_buff *skb) LOWPAN_NHC_UDP_4BIT_PORT)) { pr_debug("UDP header: both ports compression to 4 bits\n"); **hc06_ptr = LOWPAN_NHC_UDP_CS_P_11; - **(hc06_ptr + 1) = /* subtraction is faster */ + *(*hc06_ptr + 1) = /* subtraction is faster */ (u8)((uh->dest - LOWPAN_NHC_UDP_4BIT_PORT) + ((uh->source & LOWPAN_NHC_UDP_4BIT_PORT) << 4)); *hc06_ptr += 2; @@ -353,14 +353,14 @@ lowpan_compress_udp_header(u8 **hc06_ptr, struct sk_buff *skb) pr_debug("UDP header: remove 8 bits of dest\n"); **hc06_ptr = LOWPAN_NHC_UDP_CS_P_01; memcpy(*hc06_ptr + 1, &uh->source, 2); - **(hc06_ptr + 3) = (u8)(uh->dest - LOWPAN_NHC_UDP_8BIT_PORT); + *(*hc06_ptr + 3) = (u8)(uh->dest - LOWPAN_NHC_UDP_8BIT_PORT); *hc06_ptr += 4; } else if ((uh->source & LOWPAN_NHC_UDP_8BIT_MASK) == LOWPAN_NHC_UDP_8BIT_PORT) { pr_debug("UDP header: remove 8 bits of source\n"); **hc06_ptr = LOWPAN_NHC_UDP_CS_P_10; memcpy(*hc06_ptr + 1, &uh->dest, 2); - **(hc06_ptr + 3) = (u8)(uh->source - LOWPAN_NHC_UDP_8BIT_PORT); + *(*hc06_ptr + 3) = (u8)(uh->source - LOWPAN_NHC_UDP_8BIT_PORT); *hc06_ptr += 4; } else { pr_debug("UDP header: can't compress\n"); -- 1.8.4.2 -- DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access Free app hosting. Or install the open source package on any LAMP server. Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native! http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk ___ Linux-zigbee-devel mailing list Linux-zigbee-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-zigbee-devel
Re: [Linux-zigbee-devel] [PATCH net-next 0/6] 6lowpan: udp compression/uncompression fix
On Thu, 2013-11-14 at 16:48 +0100, Alexander Aring wrote: > The current 6LoWPAN udp compression/uncompression is completely broken. > This patch series fix a lot of udp compression/uncompression issues and > add support parsing with lowpan_fetch_skb function. If its broken, why targeting net-next tree (which is closed BTW ATM) ? -- DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access Free app hosting. Or install the open source package on any LAMP server. Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native! http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk ___ Linux-zigbee-devel mailing list Linux-zigbee-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-zigbee-devel
Re: [Linux-zigbee-devel] [PATCH net-next 4/6] 6lowpan: add udp warning for elided checksum
On Thu, 2013-11-14 at 16:48 +0100, Alexander Aring wrote: > Bit 5 of "UDP LOWPAN_NHC Format" indicate that the checksum can be elided. > The host need to calculate the udp checksum afterwards but this isn't > supported right now. [] > diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c [] > @@ -448,9 +448,14 @@ lowpan_uncompress_udp_header(struct sk_buff *skb, struct > udphdr *uh) > pr_debug("uncompressed UDP ports: src = %d, dst = %d\n", >ntohs(uh->source), ntohs(uh->dest)); > > - /* copy checksum */ > - memcpy(&uh->check, &skb->data[0], 2); > - skb_pull(skb, 2); > + /* checksum */ > + if (tmp & LOWPAN_NHC_UDP_CS_C) { > + pr_debug("checksum elided currently not supported"); This looks like it could need ratelimiting Also, it should end in "\n". Maybe use: pr_debug_ratelimited("checksum elided currently not supported\n"); -- DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access Free app hosting. Or install the open source package on any LAMP server. Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native! http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk ___ Linux-zigbee-devel mailing list Linux-zigbee-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-zigbee-devel
Re: [Linux-zigbee-devel] [PATCH net-next 4/6] 6lowpan: add udp warning for elided checksum
On Thu, Nov 14, 2013 at 08:32:01AM -0800, Joe Perches wrote: > On Thu, 2013-11-14 at 16:48 +0100, Alexander Aring wrote: > > Bit 5 of "UDP LOWPAN_NHC Format" indicate that the checksum can be elided. > > The host need to calculate the udp checksum afterwards but this isn't > > supported right now. > [] > > diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c > [] > > @@ -448,9 +448,14 @@ lowpan_uncompress_udp_header(struct sk_buff *skb, > > struct udphdr *uh) > > pr_debug("uncompressed UDP ports: src = %d, dst = %d\n", > > ntohs(uh->source), ntohs(uh->dest)); > > > > - /* copy checksum */ > > - memcpy(&uh->check, &skb->data[0], 2); > > - skb_pull(skb, 2); > > + /* checksum */ > > + if (tmp & LOWPAN_NHC_UDP_CS_C) { > > + pr_debug("checksum elided currently not supported"); > > This looks like it could need ratelimiting > Also, it should end in "\n". Maybe use: > > pr_debug_ratelimited("checksum elided currently not supported\n"); ah, yes. I will change it. Thanks - Alex -- DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access Free app hosting. Or install the open source package on any LAMP server. Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native! http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk ___ Linux-zigbee-devel mailing list Linux-zigbee-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-zigbee-devel
Re: [Linux-zigbee-devel] [PATCH net-next 0/6] 6lowpan: udp compression/uncompression fix
On Thu, Nov 14, 2013 at 08:19:43AM -0800, Eric Dumazet wrote: > On Thu, 2013-11-14 at 16:48 +0100, Alexander Aring wrote: > > The current 6LoWPAN udp compression/uncompression is completely broken. > > This patch series fix a lot of udp compression/uncompression issues and > > add support parsing with lowpan_fetch_skb function. > > If its broken, why targeting net-next tree (which is closed BTW ATM) ? > The 6LoWPAN stack still has several unresolved issues (some of which require more elaborate changes and are therefore net-next material anyway), so rushing fixes into 'net' wouldn't make a big difference. - Alex -- DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access Free app hosting. Or install the open source package on any LAMP server. Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native! http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk ___ Linux-zigbee-devel mailing list Linux-zigbee-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-zigbee-devel
Re: [Linux-zigbee-devel] [PATCH net-next 1/6] 6lowpan: fix udp nullpointer dereferencing
Alexander Aring wrote: > - **(hc06_ptr + 3) = (u8)(uh->dest - LOWPAN_NHC_UDP_8BIT_PORT); > + *(*hc06_ptr + 3) = (u8)(uh->dest - LOWPAN_NHC_UDP_8BIT_PORT); This patch series looks like having an opportunity for killing some unnecessary casts, too :) That is, unless you aim to be -Wconversion clean, but the kernel is full of things -Wconversion would complain about. - Werner -- DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access Free app hosting. Or install the open source package on any LAMP server. Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native! http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk ___ Linux-zigbee-devel mailing list Linux-zigbee-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-zigbee-devel
Re: [Linux-zigbee-devel] [PATCH net-next 0/6] 6lowpan: udp compression/uncompression fix
From: Eric Dumazet Date: Thu, 14 Nov 2013 08:19:43 -0800 > On Thu, 2013-11-14 at 16:48 +0100, Alexander Aring wrote: >> The current 6LoWPAN udp compression/uncompression is completely broken. >> This patch series fix a lot of udp compression/uncompression issues and >> add support parsing with lowpan_fetch_skb function. > > If its broken, why targeting net-next tree (which is closed BTW ATM) ? In any event, if you do want it to go into net-next, please resubmit this series when the net-next tree opens back up after the merge window. Thanks! -- DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access Free app hosting. Or install the open source package on any LAMP server. Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native! http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk ___ Linux-zigbee-devel mailing list Linux-zigbee-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-zigbee-devel
Re: [Linux-zigbee-devel] [PATCH net-next 0/6] 6lowpan: udp compression/uncompression fix
On Thu, Nov 14, 2013 at 05:06:20PM -0500, David Miller wrote: > From: Eric Dumazet > Date: Thu, 14 Nov 2013 08:19:43 -0800 > > > On Thu, 2013-11-14 at 16:48 +0100, Alexander Aring wrote: > >> The current 6LoWPAN udp compression/uncompression is completely broken. > >> This patch series fix a lot of udp compression/uncompression issues and > >> add support parsing with lowpan_fetch_skb function. > > > > If its broken, why targeting net-next tree (which is closed BTW ATM) ? > > In any event, if you do want it to go into net-next, please resubmit > this series when the net-next tree opens back up after the merge > window. > ahh, didn't notice that. I will resubmit this series after merge window. Thanks for this hint. :-) Sorry for the noise. - Alex -- DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access Free app hosting. Or install the open source package on any LAMP server. Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native! http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk ___ Linux-zigbee-devel mailing list Linux-zigbee-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-zigbee-devel