Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

flow_keys: include thoff into flow_keys for later usage

In skb_flow_dissect(), we perform a dissection of a skbuff. Since we're
doing the work here anyway, also store thoff for a later usage, e.g. in
the BPF filter.

Suggested-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Daniel Borkmann and committed by
David S. Miller
8ed78166 e0ebcb80

+3
+1
include/net/flow_keys.h
··· 9 9 __be32 ports; 10 10 __be16 port16[2]; 11 11 }; 12 + u16 thoff; 12 13 u8 ip_proto; 13 14 }; 14 15
+2
net/core/flow_dissector.c
··· 140 140 flow->ports = *ports; 141 141 } 142 142 143 + flow->thoff = (u16) nhoff; 144 + 143 145 return true; 144 146 } 145 147 EXPORT_SYMBOL(skb_flow_dissect);