Return the new filter through *arg, as the other classifiers do. head
is always NULL at that point, so the RTM_NEWTFILTER notification for a
matchall add has handle 0 and no TCA_OPTIONS:
# tc monitor &
# tc filter add dev d0 ingress pref 10 protocol ip matchall action pass
added filter dev d0 ingress protocol ip pref 10 matchall chain 0
With this patch it carries handle 0x1, the flags and the action.
Fixes: fd62d9f5c575 ("net/sched: matchall: Fix configuration race")
Signed-off-by: Dave Seddon <dave…@gmail.com>
---
net/sched/cls_matchall.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/sched/cls_matchall.c b/net/sched/cls_matchall.c
index 6ece63b82775..52be7660b682 100644
--- a/net/sched/cls_matchall.c
+++ b/net/sched/cls_matchall.c
@@ -230,7 +230,7 @@ static int mall_change(struct net *net, struct sk_buff *in_skb,
tcf_proto_update_usesw(tp, new->flags);
- *arg = head;
+ *arg = new;
rcu_assign_pointer(tp->root, new);
return 0;
--
2.56.0