[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20191213154634.27338-1-lmb@cloudflare.com>
Date: Fri, 13 Dec 2019 15:46:34 +0000
From: Lorenz Bauer <lmb@...udflare.com>
To: ast@...nel.org, daniel@...earbox.net,
"David S. Miller" <davem@...emloft.net>,
Jesus Sanchez-Palencia <jesus.sanchez-palencia@...el.com>,
Richard Cochran <rcochran@...utronix.de>,
Eric Dumazet <edumazet@...gle.com>, netdev@...r.kernel.org,
bpf@...r.kernel.org, linux-kernel@...r.kernel.org
Cc: kernel-team@...udflare.com, Lorenz Bauer <lmb@...udflare.com>
Subject: [PATCH bpf] bpf: clear skb->tstamp in bpf_redirect when necessary
Redirecting a packet from ingress to egress by using bpf_redirect
breaks if the egress interface has an fq qdisc installed. This is the same
problem as fixed in 8203e2d8 ("net: clear skb->tstamp in forwarding paths").
Clear skb->tstamp when redirecting into the egress path.
Fixes: 80b14de ("net: Add a new socket option for a future transmit time.")
Fixes: fb420d5 ("tcp/fq: move back to CLOCK_MONOTONIC")
Signed-off-by: Lorenz Bauer <lmb@...udflare.com>
---
net/core/filter.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/core/filter.c b/net/core/filter.c
index f1e703eed3d2..d914257763b5 100644
--- a/net/core/filter.c
+++ b/net/core/filter.c
@@ -2055,6 +2055,7 @@ static inline int __bpf_tx_skb(struct net_device *dev, struct sk_buff *skb)
}
skb->dev = dev;
+ skb->tstamp = 0;
dev_xmit_recursion_inc();
ret = dev_queue_xmit(skb);
--
2.20.1
Powered by blists - more mailing lists