mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-24 07:31:41 +00:00
pkt_sched: Stop using NLA_PUT*().
These macros contain a hidden goto, and are thus extremely error prone and make code hard to audit. Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
9360ffd185
commit
1b34ec43c9
40 changed files with 263 additions and 157 deletions
|
@ -357,7 +357,8 @@ static int tcf_fill_node(struct sk_buff *skb, struct tcf_proto *tp,
|
|||
tcm->tcm_ifindex = qdisc_dev(tp->q)->ifindex;
|
||||
tcm->tcm_parent = tp->classid;
|
||||
tcm->tcm_info = TC_H_MAKE(tp->prio, tp->protocol);
|
||||
NLA_PUT_STRING(skb, TCA_KIND, tp->ops->kind);
|
||||
if (nla_put_string(skb, TCA_KIND, tp->ops->kind))
|
||||
goto nla_put_failure;
|
||||
tcm->tcm_handle = fh;
|
||||
if (RTM_DELTFILTER != event) {
|
||||
tcm->tcm_handle = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue