Re: Fw: [Bug 209427] New: Incorrect timestamp cause packet to be dropped

To: unlisted-recipients:; (no To-header on input)
Subject: Re: Fw: [Bug 209427] New: Incorrect timestamp cause packet to be dropped
Cc: Stephen Hemminger <stephen@xxxxxxxxxxxxxxxxxx>, netdev@xxxxxxxxxxxxxxx, "lvs-devel@xxxxxxxxxxxxxxx" <lvs-devel@xxxxxxxxxxxxxxx>
From: Evgeny B <abt-admin@xxxxxxx>
Date: Fri, 9 Oct 2020 13:22:03 +0300
I just realized all my messages were bounced by mail server, this is last try

This fix works, however they should be applied for each of ipvs_xmit functions (e.g. ip_vs_nat_xmit(), ip_vs_dr_xmit(), etc.)

I look forward to seeing the patch in ml-5.x

Thank you!

On 9/30/2020 8:17 PM, Julian Anastasov wrote:

On Wed, 30 Sep 2020, Eric Dumazet wrote:

On 9/29/20 7:35 PM, Stephen Hemminger wrote:

then I noticed that in some cases skb->tstamp is equal to real ts whereas in
the regular cases where a packet pass through it's time since kernel boot. This
doesn't make any sense for me as this condition is satisfied constantly

static bool fq_packet_beyond_horizon(const struct sk_buff *skb,
                                     const struct fq_sched_data *q)
         return unlikely((s64)skb->tstamp > (s64)(q->ktime_cache + q->horizon));

Any ideas on what it can be?

Thanks for the detailed report !

I suspect ipvs or bridge code needs something similar to the fixes done in

The reason for that is that skb->tstamp can get a timestamp in input path,
with a base which is not CLOCK_MONOTONIC, unfortunately.

Whenever a packet is forwarded, its tstamp must be cleared.

Can you try :

diff --git a/net/netfilter/ipvs/ip_vs_xmit.c b/net/netfilter/ipvs/ip_vs_xmit.c
--- a/net/netfilter/ipvs/ip_vs_xmit.c
+++ b/net/netfilter/ipvs/ip_vs_xmit.c
@@ -952,6 +952,8 @@ ip_vs_prepare_tunneled_skb(struct sk_buff *skb, int skb_af,
ip_vs_drop_early_demux_sk(skb); + skb->tstamp = 0;
        Should be after all skb_forward_csum() calls in ip_vs_xmit.c

         if (skb_headroom(skb) < max_headroom || skb_cloned(skb)) {
                 new_skb = skb_realloc_headroom(skb, max_headroom);
                 if (!new_skb)

Julian Anastasov <ja@xxxxxx>

<Prev in Thread] Current Thread [Next in Thread>
  • Re: Fw: [Bug 209427] New: Incorrect timestamp cause packet to be dropped, Evgeny B <=