Skip to content

Commit 8203e2d

Browse files
edumazetdavem330
authored andcommitted
net: clear skb->tstamp in forwarding paths
Sergey reported that forwarding was no longer working if fq packet scheduler was used. This is caused by the recent switch to EDT model, since incoming packets might have been timestamped by __net_timestamp() __net_timestamp() uses ktime_get_real(), while fq expects packets using CLOCK_MONOTONIC base. The fix is to clear skb->tstamp in forwarding paths. 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: Eric Dumazet <[email protected]> Reported-by: Sergey Matyukevich <[email protected]> Tested-by: Sergey Matyukevich <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 15c6d8e commit 8203e2d

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

net/ipv4/ip_forward.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ static int ip_forward_finish(struct net *net, struct sock *sk, struct sk_buff *s
7272
if (unlikely(opt->optlen))
7373
ip_forward_options(skb);
7474

75+
skb->tstamp = 0;
7576
return dst_output(net, sk, skb);
7677
}
7778

net/ipv6/ip6_output.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,7 @@ static inline int ip6_forward_finish(struct net *net, struct sock *sk,
378378
__IP6_INC_STATS(net, ip6_dst_idev(dst), IPSTATS_MIB_OUTFORWDATAGRAMS);
379379
__IP6_ADD_STATS(net, ip6_dst_idev(dst), IPSTATS_MIB_OUTOCTETS, skb->len);
380380

381+
skb->tstamp = 0;
381382
return dst_output(net, sk, skb);
382383
}
383384

0 commit comments

Comments
 (0)