Commit 4fe683f5 authored by Thomas Graf's avatar Thomas Graf Committed by David S. Miller
Browse files

[PKT_SCHED]: Fix error handling while dumping actions

"return -err" and blindly inheriting the error code in the netlink
failure exception handler causes errors codes to be returned as
positive value therefore making them being ignored by the caller.

May lead to sending out incomplete netlink messages.
Signed-off-by: default avatarThomas Graf <>
Signed-off-by: default avatarDavid S. Miller <>
parent d152b4e1
......@@ -250,15 +250,17 @@ tcf_action_dump(struct sk_buff *skb, struct tc_action *act, int bind, int ref)
RTA_PUT(skb, a->order, 0, NULL);
err = tcf_action_dump_1(skb, a, bind, ref);
if (err < 0)
goto rtattr_failure;
goto errout;
r->rta_len = skb->tail - (u8*)r;
return 0;
err = -EINVAL;
skb_trim(skb, b - skb->data);
return -err;
return err;
struct tc_action *tcf_action_init_1(struct rtattr *rta, struct rtattr *est,
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment