Skip to content

Commit f02327a

Browse files
jhsmtgregkh
authored andcommitted
net: sched: atm: dont intepret cls results when asked to drop
[ Upstream commit a2965c7 ] If asked to drop a packet via TC_ACT_SHOT it is unsafe to assume res.class contains a valid pointer Fixes: b0188d4 ("[NET_SCHED]: sch_atm: Lindent") Signed-off-by: Jamal Hadi Salim <[email protected]> Signed-off-by: David S. Miller <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent 95da188 commit f02327a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Diff for: net/sched/sch_atm.c

+4-1
Original file line numberDiff line numberDiff line change
@@ -397,10 +397,13 @@ static int atm_tc_enqueue(struct sk_buff *skb, struct Qdisc *sch,
397397
result = tcf_classify(skb, NULL, fl, &res, true);
398398
if (result < 0)
399399
continue;
400+
if (result == TC_ACT_SHOT)
401+
goto done;
402+
400403
flow = (struct atm_flow_data *)res.class;
401404
if (!flow)
402405
flow = lookup_flow(sch, res.classid);
403-
goto done;
406+
goto drop;
404407
}
405408
}
406409
flow = NULL;

0 commit comments

Comments
 (0)