]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: add new prog type for cgroup socket filtering
authorDaniel Mack <daniel@zonque.org>
Wed, 23 Nov 2016 15:52:25 +0000 (16:52 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 25 Nov 2016 21:25:52 +0000 (16:25 -0500)
commit2ffe49afc4fce5aa06c32c6f37b174841ef5aab0
treed8f41dacce4f7c1d5305ad962a6407941ef1d9d5
parentf3f97c2cdf03dcc88f0647f22abf6d5b050e6845
bpf: add new prog type for cgroup socket filtering

This program type is similar to BPF_PROG_TYPE_SOCKET_FILTER, except that
it does not allow BPF_LD_[ABS|IND] instructions and hooks up the
bpf_skb_load_bytes() helper.

Programs of this type will be attached to cgroups for network filtering
and accounting.

Signed-off-by: Daniel Mack <daniel@zonque.org>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/uapi/linux/bpf.h
net/core/filter.c