Commit e2692eba authored by Jukka Rissanen's avatar Jukka Rissanen
Browse files

net: 802.15.4: Do not compress TCP packets



The IPv6 header compression is temporarily turned off for TCP
packets because of stack limitations when a packet needs to
be resent.

Change-Id: I572f177c727aa39757afebdc594cc07c8d8a1bd5
Signed-off-by: default avatarJukka Rissanen <jukka.rissanen@linux.intel.com>
parent 9e172def
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -897,6 +897,15 @@ static int compress(struct net_buf *buf)
  struct net_buf *mbuf;
  int ret;

#if UIP_TCP
  if(UIP_IP_BUF(buf)->proto == UIP_PROTO_TCP) {
    /* Right now do not touch TCP packets. Because we modify the IPv6 header
     * then the packet cannot be re-sent properly later. To be fixed later.
     */
    return 1;
  }
#endif

  if(uip_len(buf) >= COMPRESSION_THRESHOLD) {
#if SICSLOWPAN_COMPRESSION == SICSLOWPAN_COMPRESSION_IPV6
    return compress_hdr_ipv6(buf);