mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-16 00:34:20 +08:00
net: sched: atm: dont intepret cls results when asked to drop
[ Upstream commita2965c7be0
] If asked to drop a packet via TC_ACT_SHOT it is unsafe to assume res.class contains a valid pointer Fixes:b0188d4dbe
("[NET_SCHED]: sch_atm: Lindent") Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
95da1882ce
commit
f02327a487
@ -397,10 +397,13 @@ static int atm_tc_enqueue(struct sk_buff *skb, struct Qdisc *sch,
|
||||
result = tcf_classify(skb, NULL, fl, &res, true);
|
||||
if (result < 0)
|
||||
continue;
|
||||
if (result == TC_ACT_SHOT)
|
||||
goto done;
|
||||
|
||||
flow = (struct atm_flow_data *)res.class;
|
||||
if (!flow)
|
||||
flow = lookup_flow(sch, res.classid);
|
||||
goto done;
|
||||
goto drop;
|
||||
}
|
||||
}
|
||||
flow = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user