]> 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)
commit1796bc519a5f4149507012f2cf052c58655a2864
tree06e59399c389a2151fb56b0c937315e95393f51e
parentaceeb709a548c6099ce39af110aa7e19db870494
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: fdb157227ed9 ("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