mirror of
https://github.com/torvalds/linux.git
synced 2024-11-23 20:51:44 +00:00
pkt_sched: fix error return code in fw_change_attrs()
Fix to return -EINVAL when tb[TCA_FW_MASK] is set and head->mask != 0xFFFFFFFF instead of 0 (ifdef CONFIG_NET_CLS_IND and tb[TCA_FW_INDEV]), as done elsewhere in this function. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
e15465e180
commit
cb95ec6261
@ -204,7 +204,6 @@ fw_change_attrs(struct net *net, struct tcf_proto *tp, struct fw_filter *f,
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
err = -EINVAL;
|
||||
if (tb[TCA_FW_CLASSID]) {
|
||||
f->res.classid = nla_get_u32(tb[TCA_FW_CLASSID]);
|
||||
tcf_bind_filter(tp, &f->res, base);
|
||||
@ -218,6 +217,7 @@ fw_change_attrs(struct net *net, struct tcf_proto *tp, struct fw_filter *f,
|
||||
}
|
||||
#endif /* CONFIG_NET_CLS_IND */
|
||||
|
||||
err = -EINVAL;
|
||||
if (tb[TCA_FW_MASK]) {
|
||||
mask = nla_get_u32(tb[TCA_FW_MASK]);
|
||||
if (mask != head->mask)
|
||||
|
Loading…
Reference in New Issue
Block a user