From: Simon Vincent <simon.vincent@xsilon.com>
To: linux-wpan@vger.kernel.org
Subject: Re: problems with udp header compression
Date: Thu, 30 Oct 2014 10:18:35 +0000 [thread overview]
Message-ID: <5452107B.8010805@xsilon.com> (raw)
In-Reply-To: <5452081F.5090706@xsilon.com>
This appears to be because if you use a RAW socket with IPPROTO_RAW the
ipv6 stack passes it straight through and the skb transport_header,
network_header offset are not set.
Putting the following at the top of compress_udp_header fixes the
problem but I am not sure it is safe.
if (skb->transport_header == skb->network_header){
skb_set_transport_header(skb,sizeof(struct ipv6hdr));
}
Simon
-
On 30/10/14 09:42, Simon Vincent wrote:
> I think I have stumbled across a bug in the udp header compression or
> possibly in a higher layer of the network stack.
>
> If I send a UDP message using a RAW socket[0] the src and dest port
> numbers get corrupted on 802.15.4 devices. This does not occur on
> ethernet.
>
> If I print out the udp source and destination ports in
> compress_udp_header they are incorrect. The function udp_hdr is not
> pointing at the udp header but actually the ip6 header.
>
> If I send a UDP message using a normal UDP socket I do not have this
> problem.
>
> Any ideas?
>
> Simon
>
> [0] - socket(AF_INET6, SOCK_RAW, IPPROTO_RAW);
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wpan" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2014-10-30 10:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-30 9:42 problems with udp header compression Simon Vincent
2014-10-30 10:18 ` Simon Vincent [this message]
2014-11-01 9:10 ` Alexander Aring
2014-11-04 12:34 ` Simon Vincent
2014-11-04 12:37 ` Alexander Aring
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=5452107B.8010805@xsilon.com \
--to=simon.vincent@xsilon.com \
--cc=linux-wpan@vger.kernel.org \
/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.