Re: problems with udp header compression

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe linux-wpan" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux