1. 04 Jan, 2024 39 commits
  2. 03 Jan, 2024 1 commit
    • Lin Ma's avatar
      net/sched: cls_api: complement tcf_tfilter_dump_policy · 2ab1efad
      Lin Ma authored
      In function `tc_dump_tfilter`, the attributes array is parsed via
      tcf_tfilter_dump_policy which only describes TCA_DUMP_FLAGS. However,
      the NLA TCA_CHAIN is also accessed with `nla_get_u32`.
      
      The access to TCA_CHAIN is introduced in commit 5bc17018 ("net:
      sched: introduce multichain support for filters") and no nla_policy is
      provided for parsing at that point. Later on, tcf_tfilter_dump_policy is
      introduced in commit f8ab1807 ("net: sched: introduce terse dump
      flag") while still ignoring the fact that TCA_CHAIN needs a check. This
      patch does that by complementing the policy to allow the access
      discussed here can be safe as other cases just choose rtm_tca_policy as
      the parsing policy.
      Signed-off-by: default avatarLin Ma <linma@zju.edu.cn>
      Acked-by: default avatarJamal Hadi Salim <jhs@mojatatu.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2ab1efad