Unverified Commit 2fa9d4e7 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!6087 net/sched: act_mirred: don't override retval if we already lost the skb

parents 5c7ed853 f1fda734
Loading
Loading
Loading
Loading
+9 −5
Original line number Diff line number Diff line
@@ -319,14 +319,18 @@ static int tcf_mirred_act(struct sk_buff *skb, const struct tc_action *a,
	}

	err = tcf_mirred_forward(at_ingress, want_ingress, skb2);
	if (err) {
	if (err)
		tcf_action_inc_overlimit_qstats(&m->common);

	__this_cpu_dec(mirred_nest_level);

	return retval;

out:
	tcf_action_inc_overlimit_qstats(&m->common);
	if (tcf_mirred_is_act_redirect(m_eaction))
		retval = TC_ACT_SHOT;
	}
	__this_cpu_dec(mirred_nest_level);

	return retval;
}