Re: [PATCH bpf 1/4] net: add SO_NETNS_COOKIE socket option

2021-02-10 Thread Eric Dumazet
On 2/10/21 1:04 PM, Lorenz Bauer wrote: > We need to distinguish which network namespace a socket belongs to. > BPF has the useful bpf_get_netns_cookie helper for this, but accessing > it from user space isn't possible. Add a read-only socket option that > returns the netns cookie, similar to SO

[PATCH bpf 1/4] net: add SO_NETNS_COOKIE socket option

2021-02-10 Thread Lorenz Bauer
We need to distinguish which network namespace a socket belongs to. BPF has the useful bpf_get_netns_cookie helper for this, but accessing it from user space isn't possible. Add a read-only socket option that returns the netns cookie, similar to SO_COOKIE. If network namespaces are disabled, SO_NET