bpf-helpers(7)
states that bpf_get_socket_cookie()
returns 0 if the socket field is missing inside skb
.
Under what conditions is the socket field missing in this context? Does it depend where in the datapath a BPF program is attached to? For instance, would bpf_get_socket_cookie()
always return 0 in the case of a filter that attaches with tc filter add dev ... ingress ... bpf ...
(on a Linux kernel 4.19, say)?