]> git.baikalelectronics.ru Git - kernel.git/commit
net_sched: fix backward compatibility for TCA_ACT_KIND
authorCong Wang <xiyou.wangcong@gmail.com>
Mon, 7 Oct 2019 20:26:29 +0000 (13:26 -0700)
committerJakub Kicinski <jakub.kicinski@netronome.com>
Tue, 8 Oct 2019 23:29:35 +0000 (16:29 -0700)
commit79b469fcbd28b608f15abb7392a21d90a137a7f6
tree06e59399c389a2151fb56b0c937315e95393f51e
parent0d7b9a8b51eb83068d738b78fd3c1771e6200ba5
net_sched: fix backward compatibility for TCA_ACT_KIND

For TCA_ACT_KIND, we have to keep the backward compatibility too,
and rely on nla_strlcpy() to check and terminate the string with
a NUL.

Note for TC actions, nla_strcmp() is already used to compare kind
strings, so we don't need to fix other places.

Fixes: ef97e9c0127d ("net_sched: add policy validation for action attributes")
Reported-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Cc: Jamal Hadi Salim <jhs@mojatatu.com>
Cc: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Reviewed-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
net/sched/act_api.c