1. 16 5月, 2014 2 次提交
    • P
      6lowpan: fix fragmentation · d4b2816d
      Phoebe Buckheister 提交于
      Currently, 6lowpan creates one 802.15.4 MAC header for the original
      packet the device was given by upper layers and reuses this header for
      all fragments, if fragmentation is required. This also reuses frame
      sequence numbers, which must not happen. 6lowpan also has issues with
      fragmentation in the presence of security headers, since those may imply
      the presence of trailing fields that are not accounted for by the
      fragmentation code right now.
      
      Fix both of these issues by properly allocating fragment skbs with
      headromm and tailroom as specified by the underlying device, create one
      header for each skb instead of reusing the original header, let the
      underlying device do the rest.
      Signed-off-by: NPhoebe Buckheister <phoebe.buckheister@itwm.fraunhofer.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d4b2816d
    • P
      ieee802154: change _cb handling slightly · 32edc40a
      Phoebe Buckheister 提交于
      The current mac_cb handling of ieee802154 is rather awkward and limited.
      Decompose the single flags field into multiple fields with the meanings
      of each subfield of the flags field to make future extensions (for
      example, link-layer security) easier. Also don't set the frame sequence
      number in upper layers, since that's a thing the MAC is supposed to set
      on frame transmit - we set it on header creation, but assuming that
      upper layers do not blindly duplicate our headers, this is fine.
      Signed-off-by: NPhoebe Buckheister <phoebe.buckheister@itwm.fraunhofer.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      32edc40a
  2. 19 3月, 2014 1 次提交
  3. 15 3月, 2014 5 次提交
  4. 13 3月, 2014 1 次提交
  5. 07 3月, 2014 1 次提交
  6. 03 3月, 2014 2 次提交
  7. 01 3月, 2014 5 次提交
  8. 11 2月, 2014 1 次提交
  9. 10 2月, 2014 1 次提交
  10. 06 1月, 2014 1 次提交
    • D
      net: 6lowpan: fix lowpan_header_create non-compression memcpy call · 965801e1
      Daniel Borkmann 提交于
      In function lowpan_header_create(), we invoke the following code
      construct:
      
        struct ipv6hdr *hdr;
        ...
        hdr = ipv6_hdr(skb);
        ...
        if (...)
          memcpy(hc06_ptr + 1, &hdr->flow_lbl[1], 2);
        else
          memcpy(hc06_ptr, &hdr, 4);
      
      Where the else path of the condition, that is, non-compression
      path, calls memcpy() with a pointer to struct ipv6hdr *hdr as
      source, thus two levels of indirection. This cannot be correct,
      and likely only one level of pointer was intended as source
      buffer for memcpy() here.
      
      Fixes: 44331fe2 ("IEEE802.15.4: 6LoWPAN basic support")
      Signed-off-by: NDaniel Borkmann <dborkman@redhat.com>
      Cc: Alexander Smirnov <alex.bluesman.smirnov@gmail.com>
      Cc: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
      Cc: Werner Almesberger <werner@almesberger.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      965801e1
  11. 13 12月, 2013 1 次提交
  12. 12 12月, 2013 1 次提交
  13. 15 11月, 2013 1 次提交
    • J
      6lowpan: Uncompression of traffic class field was incorrect · 1188f054
      Jukka Rissanen 提交于
      If priority/traffic class field in IPv6 header is set (seen when
      using ssh), the uncompression sets the TC and Flow fields incorrectly.
      
      Example:
      
      This is IPv6 header of a sent packet. Note the priority/TC (=1) in
      the first byte.
      
      00000000: 61 00 00 00 00 2c 06 40 fe 80 00 00 00 00 00 00
      00000010: 02 02 72 ff fe c6 42 10 fe 80 00 00 00 00 00 00
      00000020: 02 1e ab ff fe 4c 52 57
      
      This gets compressed like this in the sending side
      
      00000000: 72 31 04 06 02 1e ab ff fe 4c 52 57 ec c2 00 16
      00000010: aa 2d fe 92 86 4e be c6 ....
      
      In the receiving end, the packet gets uncompressed to this
      IPv6 header
      
      00000000: 60 06 06 02 00 2a 1e 40 fe 80 00 00 00 00 00 00
      00000010: 02 02 72 ff fe c6 42 10 fe 80 00 00 00 00 00 00
      00000020: ab ff fe 4c 52 57 ec c2
      
      First four bytes are set incorrectly and we have also lost
      two bytes from destination address.
      
      The fix is to switch the case values in switch statement
      when checking the TC field.
      Signed-off-by: NJukka Rissanen <jukka.rissanen@linux.intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1188f054
  14. 08 11月, 2013 1 次提交
  15. 31 10月, 2013 4 次提交
  16. 29 10月, 2013 5 次提交
  17. 09 10月, 2013 2 次提交
  18. 21 8月, 2013 5 次提交