1. 13 4月, 2016 2 次提交
  2. 24 2月, 2016 1 次提交
  3. 11 2月, 2016 1 次提交
  4. 06 1月, 2016 1 次提交
  5. 10 12月, 2015 1 次提交
  6. 03 11月, 2015 1 次提交
  7. 22 10月, 2015 1 次提交
    • A
      ieee802154: 6lowpan: fix memory leak · aeedebff
      Alexander Aring 提交于
      Looking at current situation of memory management in 6lowpan receive
      function I detected some invalid handling. After calling
      lowpan_invoke_rx_handlers we will do a kfree_skb and then NET_RX_DROP on
      error handling. We don't do this before, also on
      skb_share_check/skb_unshare which might manipulate the reference
      counters.
      
      After running some 'grep -r "dev_add_pack" net/' to look how others
      packet-layer receive callbacks works I detected that every subsystem do
      a kfree_skb, then NET_RX_DROP without calling skb functions which
      might manipulate the skb reference counters. This is the reason why we
      should do the same here like all others subsystems. I didn't find any
      documentation how the packet-layer receive callbacks handle NET_RX_DROP
      return values either.
      
      This patch will add a kfree_skb, then NET_RX_DROP handling for the
      "trivial checks", in case of skb_share_check/skb_unshare the kfree_skb
      call will be done inside these functions.
      Signed-off-by: NAlexander Aring <alex.aring@gmail.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      aeedebff
  8. 21 10月, 2015 4 次提交
  9. 08 10月, 2015 1 次提交
  10. 03 10月, 2015 1 次提交
  11. 01 10月, 2015 1 次提交
    • A
      ieee802154: handle datagram variables as u16 · 5f509239
      Alexander Aring 提交于
      This reverts commit 9abc378c66e3d6f437eed77c1c534cbc183523f7
      ("ieee802154: 6lowpan: change datagram var types").
      
      The reason is that I forgot the IPv6 fragmentation here. Our MTU of
      lowpan interface is 1280 and skb->len should not above of that. If we
      reach a payload above 1280 in IPv6 header then we have a IPv6
      fragmentation above 802.15.4 6LoWPAN fragmentation. The type "u16" was
      fine, instead I added now a WARN_ON_ONCE if skb->len is above MTU which
      should never happen otherwise IPv6 on minimum MTU size is broken.
      Signed-off-by: NAlexander Aring <alex.aring@gmail.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      5f509239
  12. 30 9月, 2015 6 次提交
  13. 22 9月, 2015 3 次提交
    • A
      ieee802154: change needed headroom/tailroom · 87a93e4e
      Alexander Aring 提交于
      This patch cleanups needed_headroom, needed_tailroom and hard_header_len
      fields for wpan and lowpan interfaces.
      
      For wpan interfaces the worst case mac header len should be part of
      needed_headroom, currently this is set as hard_header_len, but
      hard_header_len should be set to the minimum header length which xmit
      call assumes and this is the minimum frame length of 802.15.4.
      The hard_header_len value will check inside send callbacl of AF_PACKET
      raw sockets.
      
      For lowpan interfaces, if fragmentation isn't needed the skb will
      call dev_hard_header for 802154 layer and queue it afterwards. This
      happens without new skb allocation, so we need the same headroom and
      tailroom lengths like 802154 inside 802154 6lowpan layer. At least we
      assume as minimum header length an ipv6 header size.
      Signed-off-by: NAlexander Aring <alex.aring@gmail.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      87a93e4e
    • A
      ieee802154: introduce wpan_dev_header_ops · 838b83d6
      Alexander Aring 提交于
      The current header_ops callback structure of net device are used mostly
      from 802.15.4 upper-layers. Because this callback structure is a very
      generic one, which is also used by e.g. DGRAM AF_PACKET sockets, we
      can't make this callback structure 802.15.4 specific which is currently
      is.
      
      I saw the smallest "constraint" for calling this callback with
      dev_hard_header/dev_parse_header by AF_PACKET which assign a 8 byte
      array for address void pointers. Currently 802.15.4 specific protocols
      like af802154 and 6LoWPAN will assign the "struct ieee802154_addr" as
      these parameters which is greater than 8 bytes. The current callback
      implementation for header_ops.create assumes always a complete
      "struct ieee802154_addr" which AF_PACKET can't never handled and is
      greater than 8 bytes.
      
      For that reason we introduce now a "generic" create/parse header_ops
      callback which allows handling with intra-pan extended addresses only.
      This allows a small use-case with AF_PACKET to send "somehow" a valid
      dataframe over DGRAM.
      
      To keeping the current dev_hard_header behaviour we introduce a similar
      callback structure "wpan_dev_header_ops" which contains 802.15.4 specific
      upper-layer header creation functionality, which can be called by
      wpan_dev_hard_header.
      Signed-off-by: NAlexander Aring <alex.aring@gmail.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      838b83d6
    • A
      ieee802154: header_ops: fix frame control setting · a1da67b8
      Alexander Aring 提交于
      Sometimes upper-layer protocols wants to generate a new mac header by
      filling "struct ieee802154_hdr" only. These upper-layers sets for the
      address settings the source and dest fields, but not the fc fields for
      indicate the source and dest address mode. This patch changes the
      "ieee802154_hdr_push" function so the fc address fields are set
      according the source and dest fields of "struct ieee802154_hdr".
      Signed-off-by: NAlexander Aring <alex.aring@gmail.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      a1da67b8
  14. 17 9月, 2015 16 次提交