summaryrefslogtreecommitdiff
path: root/net/core
diff options
context:
space:
mode:
authorStanislav Fomichev <sdf@google.com>2019-04-01 13:57:30 -0700
committerDaniel Borkmann <daniel@iogearbox.net>2019-04-03 16:49:48 +0200
commit2c3af7d901c61c101c02f431cfb520af9ff56ab4 (patch)
treec47ea3641f3f3c97386ad5bcb9fdfe3a03717098 /net/core
parentb2e54b09a3d29c4db883b920274ca8dca4d9f04d (diff)
selftests/bpf: fix vlan handling in flow dissector program
When we tail call PROG(VLAN) from parse_eth_proto we don't need to peek back to handle vlan proto because we didn't adjust nhoff/thoff yet. Use flow_keys->n_proto, that we set in parse_eth_proto instead and properly increment nhoff as well. Also, always use skb->protocol and don't look at skb->vlan_present. skb->vlan_present indicates that vlan information is stored out-of-band in skb->vlan_{tci,proto} and vlan header is already pulled from skb. That means, skb->vlan_present == true is not relevant for BPF flow dissector. Add simple test cases with VLAN tagged frames: * single vlan for ipv4 * double vlan for ipv6 Signed-off-by: Stanislav Fomichev <sdf@google.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'net/core')
0 files changed, 0 insertions, 0 deletions