diff options
Diffstat (limited to 'net/sched/cls_bpf.c')
-rw-r--r-- | net/sched/cls_bpf.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/net/sched/cls_bpf.c b/net/sched/cls_bpf.c index 8dc84300ee79..425fe6a0eda3 100644 --- a/net/sched/cls_bpf.c +++ b/net/sched/cls_bpf.c | |||
@@ -103,8 +103,9 @@ static int cls_bpf_classify(struct sk_buff *skb, const struct tcf_proto *tp, | |||
103 | } | 103 | } |
104 | 104 | ||
105 | if (prog->exts_integrated) { | 105 | if (prog->exts_integrated) { |
106 | res->class = prog->res.class; | 106 | res->class = 0; |
107 | res->classid = qdisc_skb_cb(skb)->tc_classid; | 107 | res->classid = TC_H_MAJ(prog->res.classid) | |
108 | qdisc_skb_cb(skb)->tc_classid; | ||
108 | 109 | ||
109 | ret = cls_bpf_exec_opcode(filter_res); | 110 | ret = cls_bpf_exec_opcode(filter_res); |
110 | if (ret == TC_ACT_UNSPEC) | 111 | if (ret == TC_ACT_UNSPEC) |
@@ -114,10 +115,12 @@ static int cls_bpf_classify(struct sk_buff *skb, const struct tcf_proto *tp, | |||
114 | 115 | ||
115 | if (filter_res == 0) | 116 | if (filter_res == 0) |
116 | continue; | 117 | continue; |
117 | 118 | if (filter_res != -1) { | |
118 | *res = prog->res; | 119 | res->class = 0; |
119 | if (filter_res != -1) | ||
120 | res->classid = filter_res; | 120 | res->classid = filter_res; |
121 | } else { | ||
122 | *res = prog->res; | ||
123 | } | ||
121 | 124 | ||
122 | ret = tcf_exts_exec(skb, &prog->exts, res); | 125 | ret = tcf_exts_exec(skb, &prog->exts, res); |
123 | if (ret < 0) | 126 | if (ret < 0) |