Without dropping dst, the packets sent from local mirred/redirected
to ingress will may still use the old dst. ip_rcv() will drop it as
the old dst is for output and its .input is dst_discard.
This patch is to fix by also dropping dst for those packets that are
mirred or redirected to ingress in act_mirred.
Fixes: b57dc7c13ea9 ("net/sched: Introduce action ct")
Signed-off-by: Xin Long <lucien.xin@gmail.com>
---
net/sched/act_mirred.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/net/sched/act_mirred.c b/net/sched/act_mirred.c
index 46dff1f1e7c8..5e30b3e64b63 100644
--- a/net/sched/act_mirred.c
+++ b/net/sched/act_mirred.c
@@ -19,6 +19,7 @@
#include <linux/if_arp.h>
#include <net/net_namespace.h>
#include <net/netlink.h>
+#include <net/dst.h>
#include <net/pkt_sched.h>
#include <net/pkt_cls.h>
#include <linux/tc_act/tc_mirred.h>
@@ -209,6 +210,7 @@ static int tcf_mirred_forward(bool want_ingress, struct sk_buff *skb)
return tcf_dev_queue_xmit(skb, dev_queue_xmit);
nf_reset_ct(skb);
+ skb_dst_drop(skb);
return netif_receive_skb(skb);
}
--
2.27.0