Skip to content

Commit ebecaa6

Browse files
jhsmtdavem330
authored andcommitted
net sched actions: bug fix dumping actions directly didnt produce NLMSG_DONE
This refers to commands to direct action access as follows: sudo tc actions add action drop index 12 sudo tc actions add action pipe index 10 And then dumping them like so: sudo tc actions ls action gact iproute2 worked because it depended on absence of TCA_ACT_TAB TLV as end of message. This fix has been tested with iproute2 and is backward compatible. Signed-off-by: Jamal Hadi Salim <[email protected]> Acked-by: Cong Wang <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent d15ecce commit ebecaa6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/sched/act_api.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1118,7 +1118,7 @@ tc_dump_action(struct sk_buff *skb, struct netlink_callback *cb)
11181118
nla_nest_end(skb, nest);
11191119
ret = skb->len;
11201120
} else
1121-
nla_nest_cancel(skb, nest);
1121+
nlmsg_trim(skb, b);
11221122

11231123
nlh->nlmsg_len = skb_tail_pointer(skb) - b;
11241124
if (NETLINK_CB(cb->skb).portid && ret)

0 commit comments

Comments
 (0)