diff --git a/net/sched/act_mirred.c b/net/sched/act_mirred.c index 4f912c0..35b8b8e 100644 --- a/net/sched/act_mirred.c +++ b/net/sched/act_mirred.c @@ -156,8 +156,14 @@ static int tcf_mirred(struct sk_buff *skb, const struct tc_action *a, goto out; if (!(at & AT_EGRESS)) { - if (m->tcfm_ok_push) + if (m->tcfm_ok_push) { + err = skb_cow_head(skb2, skb2->dev->hard_header_len); + if (err) { + kfree_skb(skb2); + goto out; + } skb_push(skb2, skb2->dev->hard_header_len); + } } /* mirror is always swallowed */