Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 749e6720 authored by Or Gerlitz's avatar Or Gerlitz Committed by David S. Miller
Browse files

net/sched: cls_flower: Properly handle classifier flags dumping



Dump the classifier flags only if non zero and make sure to check
the return status of the handler that puts them into the netlink msg.

Signed-off-by: default avatarOr Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ad8e963c
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1229,7 +1229,8 @@ static int fl_dump(struct net *net, struct tcf_proto *tp, unsigned long fh,
	if (fl_dump_key_flags(skb, key->control.flags, mask->control.flags))
		goto nla_put_failure;

	nla_put_u32(skb, TCA_FLOWER_FLAGS, f->flags);
	if (f->flags && nla_put_u32(skb, TCA_FLOWER_FLAGS, f->flags))
		goto nla_put_failure;

	if (tcf_exts_dump(skb, &f->exts))
		goto nla_put_failure;