Comments
Patch
@@ -3263,14 +3263,6 @@ another_round:
if (sk_memalloc_socks() && skb_pfmemalloc(skb))
goto skip_taps;
- list_for_each_entry_rcu(ptype, &ptype_all, list) {
- if (!ptype->dev || ptype->dev == skb->dev) {
- if (pt_prev)
- ret = deliver_skb(skb, pt_prev, orig_dev);
- pt_prev = ptype;
- }
- }
-
skip_taps:
#ifdef CONFIG_NET_CLS_ACT
skb = handle_ing(skb, &pt_prev, &ret, orig_dev);
@@ -3337,6 +3329,11 @@ ncls:
} else {
drop:
atomic_long_inc(&skb->dev->rx_dropped);
+ list_for_each_entry_rcu(ptype, &ptype_all, list) {
+ if (!ptype->dev || ptype->dev == skb->dev) {
+ ret = deliver_skb(skb, ptype, orig_dev);
+ }
+ }
kfree_skb(skb);
/* Jamal, now you will not able to escape explaining
* me how you were going to use this. :-)