On Mon, 2016-09-12 at 16:46 -0400, Jamal Hadi Salim wrote: > From: Jamal Hadi Salim <j...@mojatatu.com>
> + > + /* XXX: if you are going to edit more fields beyond ethernet header > + * (example when you add IP header replacement or vlan swap) > + * then MAX_EDIT_LEN needs to change appropriately > + */ > + err = skb_ensure_writable(skb, ETH_HLEN); > + if (unlikely(err)) /* best policy is to drop on the floor */ > + action = TC_ACT_SHOT; > + > + rcu_read_lock(); > + action = READ_ONCE(d->tcf_action); You are overwriting @action, while you might have put TC_ACT_SHOT in it 3 lines above. Maybe you meant : if (err) return TC_ACT_SHOT;