https://github.com/torvalds/linux
Revision 916f6efae62305796e012e7c3a7884a267cbacbf authored by Florian Westphal on 17 April 2019, 00:17:23 UTC, committed by Pablo Neira Ayuso on 22 April 2019, 08:34:30 UTC
setting net.netfilter.nf_conntrack_timestamp=1 breaks xmit with fq
scheduler.  skb->tstamp might be "refreshed" using ktime_get_real(),
but fq expects CLOCK_MONOTONIC.

This patch removes all places in netfilter that check/set skb->tstamp:

1. To fix the bogus "start" time seen with conntrack timestamping for
   outgoing packets, never use skb->tstamp and always use current time.
2. In nfqueue and nflog, only use skb->tstamp for incoming packets,
   as determined by current hook (prerouting, input, forward).
3. xt_time has to use system clock as well rather than skb->tstamp.
   We could still use skb->tstamp for prerouting/input/foward, but
   I see no advantage to make this conditional.

Fixes: fb420d5d91c1 ("tcp/fq: move back to CLOCK_MONOTONIC")
Cc: Eric Dumazet <edumazet@google.com>
Reported-by: Michal Soltys <soltys@ziu.info>
Signed-off-by: Florian Westphal <fw@strlen.de>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
1 parent 7caa56f
History
Tip revision: 916f6efae62305796e012e7c3a7884a267cbacbf authored by Florian Westphal on 17 April 2019, 00:17:23 UTC
netfilter: never get/set skb->tstamp
Tip revision: 916f6ef
File Mode Size
Kconfig -rw-r--r-- 3.9 KB
Makefile -rw-r--r-- 870 bytes
array.c -rw-r--r-- 21.1 KB
base.c -rw-r--r-- 87.7 KB
cmdline.c -rw-r--r-- 415 bytes
consoles.c -rw-r--r-- 1.9 KB
cpuinfo.c -rw-r--r-- 698 bytes
devices.c -rw-r--r-- 1.1 KB
fd.c -rw-r--r-- 7.7 KB
fd.h -rw-r--r-- 539 bytes
generic.c -rw-r--r-- 17.4 KB
inode.c -rw-r--r-- 11.9 KB
internal.h -rw-r--r-- 8.7 KB
interrupts.c -rw-r--r-- 841 bytes
kcore.c -rw-r--r-- 15.5 KB
kmsg.c -rw-r--r-- 1.5 KB
loadavg.c -rw-r--r-- 880 bytes
meminfo.c -rw-r--r-- 5.1 KB
namespaces.c -rw-r--r-- 4.1 KB
nommu.c -rw-r--r-- 2.9 KB
page.c -rw-r--r-- 7.0 KB
proc_net.c -rw-r--r-- 9.7 KB
proc_sysctl.c -rw-r--r-- 41.0 KB
proc_tty.c -rw-r--r-- 4.5 KB
root.c -rw-r--r-- 7.6 KB
self.c -rw-r--r-- 1.7 KB
softirqs.c -rw-r--r-- 741 bytes
stat.c -rw-r--r-- 6.0 KB
task_mmu.c -rw-r--r-- 44.1 KB
task_nommu.c -rw-r--r-- 6.6 KB
thread_self.c -rw-r--r-- 1.9 KB
uptime.c -rw-r--r-- 922 bytes
util.c -rw-r--r-- 383 bytes
version.c -rw-r--r-- 515 bytes
vmcore.c -rw-r--r-- 39.9 KB

back to top