bpf: Enable retrieval of socket cookie for bind/post-bind hook
authorDaniel Borkmann <daniel@iogearbox.net>
Fri, 27 Mar 2020 15:58:50 +0000 (16:58 +0100)
committerAlexei Starovoitov <ast@kernel.org>
Sat, 28 Mar 2020 02:40:38 +0000 (19:40 -0700)
commit0e53d9e5e82056555020c47ee0c7a087147be084
tree4b73d6302c76cbcb11e9e2dc429af19f8ae33b74
parentf54a5bba120398e4d404e9553e6b92e6822eade0
bpf: Enable retrieval of socket cookie for bind/post-bind hook

We currently make heavy use of the socket cookie in BPF's connect(),
sendmsg() and recvmsg() hooks for load-balancing decisions. However,
it is currently not enabled/implemented in BPF {post-}bind hooks
where it can later be used in combination for correlation in the tc
egress path, for example.

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/e9d71f310715332f12d238cc650c1edc5be55119.1585323121.git.daniel@iogearbox.net
net/core/filter.c