From: Alexander Aring <alex.aring@gmail.com>
To: Simon Vincent <simon.vincent@xsilon.com>
Cc: linux-wpan@vger.kernel.org, linux-bluetooth@vger.kernel.org
Subject: Re: [PATCHv2 bluetooth-next] 6lowpan: fix udp header compression when using raw sockets
Date: Tue, 4 Nov 2014 15:42:34 +0100 [thread overview]
Message-ID: <20141104144232.GA30647@omega> (raw)
In-Reply-To: <1415111693-1711-1-git-send-email-simon.vincent@xsilon.com>
On Tue, Nov 04, 2014 at 02:34:53PM +0000, Simon Vincent wrote:
> If you use RAW sockets the transport header offset is not set by the
> ipv6 stack so when we get to the udp header compression it does not
> compress the right part of the packet.
>
> This patch adds a check for this scenario and sets the transport
> header offset.
>
> Signed-off-by: Simon Vincent <simon.vincent@xsilon.com>
> ---
> net/6lowpan/iphc.c | 10 +++++++++-
> 1 file changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/net/6lowpan/iphc.c b/net/6lowpan/iphc.c
> index 73a7065..305bf2b 100644
> --- a/net/6lowpan/iphc.c
> +++ b/net/6lowpan/iphc.c
> @@ -512,9 +512,17 @@ static u8 lowpan_compress_addr_64(u8 **hc_ptr, u8 shift,
>
> static void compress_udp_header(u8 **hc_ptr, struct sk_buff *skb)
> {
> - struct udphdr *uh = udp_hdr(skb);
> + struct udphdr *uh;
> u8 tmp;
>
> + /* In the case of RAW sockets the transport header is not set by
> + * the ip6 stack so we must set it ourselves
> + */
Should be:
/* In the case of RAW sockets the transport header is not set by
* the ip6 stack so we must set it ourselves
*/
Otherwise looking good! ;-)
- Alex
next prev parent reply other threads:[~2014-11-04 14:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-04 14:34 [PATCHv2 bluetooth-next] 6lowpan: fix udp header compression when using raw sockets Simon Vincent
2014-11-04 14:42 ` Alexander Aring [this message]
-- strict thread matches above, loose matches on Subject: below --
2014-11-04 14:48 Simon Vincent
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20141104144232.GA30647@omega \
--to=alex.aring@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-wpan@vger.kernel.org \
--cc=simon.vincent@xsilon.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.