Skip to content

Commit de20900

Browse files
Florian Westphalummakynes
authored andcommitted
netfilter: nf_flow_table: clear skb tstamp before xmit
If 'fq' qdisc is used and a program has requested timestamps, skb->tstamp needs to be cleared, else fq will treat these as 'transmit time'. Signed-off-by: Florian Westphal <[email protected]> Signed-off-by: Pablo Neira Ayuso <[email protected]>
1 parent 478553f commit de20900

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

net/netfilter/nf_flow_table_ip.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,6 @@ static unsigned int nf_flow_xmit_xfrm(struct sk_buff *skb,
228228
{
229229
skb_orphan(skb);
230230
skb_dst_set_noref(skb, dst);
231-
skb->tstamp = 0;
232231
dst_output(state->net, state->sk, skb);
233232
return NF_STOLEN;
234233
}
@@ -284,6 +283,7 @@ nf_flow_offload_ip_hook(void *priv, struct sk_buff *skb,
284283
flow->timeout = (u32)jiffies + NF_FLOW_TIMEOUT;
285284
iph = ip_hdr(skb);
286285
ip_decrease_ttl(iph);
286+
skb->tstamp = 0;
287287

288288
if (unlikely(dst_xfrm(&rt->dst))) {
289289
memset(skb->cb, 0, sizeof(struct inet_skb_parm));
@@ -512,6 +512,7 @@ nf_flow_offload_ipv6_hook(void *priv, struct sk_buff *skb,
512512
flow->timeout = (u32)jiffies + NF_FLOW_TIMEOUT;
513513
ip6h = ipv6_hdr(skb);
514514
ip6h->hop_limit--;
515+
skb->tstamp = 0;
515516

516517
if (unlikely(dst_xfrm(&rt->dst))) {
517518
memset(skb->cb, 0, sizeof(struct inet6_skb_parm));

0 commit comments

Comments
 (0)