]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: allow BPF programs access 'protocol' and 'vlan_tci' fields
authorAlexei Starovoitov <ast@plumgrid.com>
Tue, 17 Mar 2015 01:06:02 +0000 (18:06 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 17 Mar 2015 19:06:31 +0000 (15:06 -0400)
commit2b63344ef982d39bf3c91f920303fd0a70e5c227
tree0a05287480110f113d719a1e3852b4f5e647685d
parent8ea6627c81d0b27a49adfdd374d7cd60d63b697d
bpf: allow BPF programs access 'protocol' and 'vlan_tci' fields

as a follow on to patch e3f73e4a7308 ("bpf: allow eBPF access skb fields")
this patch allows 'protocol' and 'vlan_tci' fields to be accessible
from extended BPF programs.

The usage of 'protocol', 'vlan_present' and 'vlan_tci' fields is the same as
corresponding SKF_AD_PROTOCOL, SKF_AD_VLAN_TAG_PRESENT and SKF_AD_VLAN_TAG
accesses in classic BPF.

Signed-off-by: Alexei Starovoitov <ast@plumgrid.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/uapi/linux/bpf.h
net/core/filter.c
samples/bpf/test_verifier.c