1. 16 10月, 2018 1 次提交
    • D
      net/sched: cls_api: add missing validation of netlink attributes · e331473f
      Davide Caratti 提交于
      Similarly to what has been done in 8b4c3cdd ("net: sched: Add policy
      validation for tc attributes"), fix classifier code to add validation of
      TCA_CHAIN and TCA_KIND netlink attributes.
      
      tested with:
       # ./tdc.py -c filter
      
      v2: Let sch_api and cls_api share nla_policy they have in common, thanks
          to David Ahern.
      v3: Avoid EXPORT_SYMBOL(), as validation of those attributes is not done
          by TC modules, thanks to Cong Wang.
          While at it, restore the 'Delete / get qdisc' comment to its orginal
          position, just above tc_get_qdisc() function prototype.
      
      Fixes: 5bc17018 ("net: sched: introduce multichain support for filters")
      Signed-off-by: NDavide Caratti <dcaratti@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e331473f
  2. 14 9月, 2018 1 次提交
  3. 28 8月, 2018 2 次提交
  4. 12 8月, 2018 1 次提交
  5. 10 8月, 2018 1 次提交
  6. 04 8月, 2018 1 次提交
  7. 02 8月, 2018 3 次提交
  8. 28 7月, 2018 1 次提交
  9. 27 7月, 2018 2 次提交
  10. 24 7月, 2018 4 次提交
  11. 22 7月, 2018 1 次提交
  12. 19 7月, 2018 1 次提交
  13. 14 7月, 2018 1 次提交
  14. 08 7月, 2018 3 次提交
  15. 26 6月, 2018 2 次提交
  16. 07 6月, 2018 1 次提交
  17. 05 6月, 2018 2 次提交
  18. 01 6月, 2018 1 次提交
    • V
      net: sched: split tc_ctl_tfilter into three handlers · c431f89b
      Vlad Buslov 提交于
      tc_ctl_tfilter handles three netlink message types: RTM_NEWTFILTER,
      RTM_DELTFILTER, RTM_GETTFILTER. However, implementation of this function
      involves a lot of branching on specific message type because most of the
      code is message-specific. This significantly complicates adding new
      functionality and doesn't provide much benefit of code reuse.
      
      Split tc_ctl_tfilter to three standalone functions that handle filter new,
      delete and get requests.
      
      The only truly protocol independent part of tc_ctl_tfilter is code that
      looks up queue, class, and block. Refactor this code to standalone
      tcf_block_find function that is used by all three new handlers.
      Signed-off-by: NVlad Buslov <vladbu@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c431f89b
  19. 25 5月, 2018 2 次提交
  20. 12 5月, 2018 1 次提交
  21. 28 3月, 2018 1 次提交
  22. 10 3月, 2018 1 次提交
  23. 28 2月, 2018 1 次提交
  24. 21 2月, 2018 1 次提交
    • R
      net: sched: report if filter is too large to dump · 5ae437ad
      Roman Kapl 提交于
      So far, if the filter was too large to fit in the allocated skb, the
      kernel did not return any error and stopped dumping. Modify the dumper
      so that it returns -EMSGSIZE when a filter fails to dump and it is the
      first filter in the skb. If we are not first, we will get a next chance
      with more room.
      
      I understand this is pretty near to being an API change, but the
      original design (silent truncation) can be considered a bug.
      
      Note: The error case can happen pretty easily if you create a filter
      with 32 actions and have 4kb pages. Also recent versions of iproute try
      to be clever with their buffer allocation size, which in turn leads to
      Signed-off-by: NRoman Kapl <code@rkapl.cz>
      Acked-by: NJiri Pirko <jiri@mellanox.com>
      Acked-by: NCong Wang <xiyou.wangcong@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5ae437ad
  25. 17 2月, 2018 3 次提交
  26. 14 2月, 2018 1 次提交