diff options
author | Stanislav Fomichev <sdf@google.com> | 2019-04-01 13:57:30 -0700 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2019-04-03 16:49:48 +0200 |
commit | 2c3af7d901c61c101c02f431cfb520af9ff56ab4 (patch) | |
tree | c47ea3641f3f3c97386ad5bcb9fdfe3a03717098 /net | |
parent | b2e54b09a3d29c4db883b920274ca8dca4d9f04d (diff) | |
download | linux-2c3af7d901c61c101c02f431cfb520af9ff56ab4.tar.bz2 |
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')
0 files changed, 0 insertions, 0 deletions