]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: add TCP_SAVE_SYN/TCP_SAVED_SYN options for bpf_(set|get)sockopt
authorNikita V. Shirokov <tehnerd@fb.com>
Thu, 30 Aug 2018 14:51:53 +0000 (07:51 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Fri, 31 Aug 2018 23:35:59 +0000 (01:35 +0200)
commit601ab8a459fe6255ef06b619433f5a4e6583ba79
treec6cf00bf6e1509ebc1e829952ff8712ce067baaa
parentbabe4ffca19c1138dc19b585ae661aceb4c5a3ed
bpf: add TCP_SAVE_SYN/TCP_SAVED_SYN options for bpf_(set|get)sockopt

Adding support for two new bpf get/set sockopts: TCP_SAVE_SYN (set)
and TCP_SAVED_SYN (get). This would allow for bpf program to build
logic based on data from ingress SYN packet (e.g. doing tcp's tos/
tclass reflection (see sample prog)) and do it transparently from
userspace program point of view.

Signed-off-by: Nikita V. Shirokov <tehnerd@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
net/core/filter.c