On 2/19/21 1:23 PM, Lorenz Bauer wrote:
> On Fri, 19 Feb 2021 at 11:49, Eric Dumazet wrote:
>>
>>> + case SO_NETNS_COOKIE:
>>> + lv = sizeof(u64);
>>> + if (len < lv)
>>> + return -EINVAL;
>>
>> if (len != lv)
>> return -EI
On Fri, 19 Feb 2021 at 11:49, Eric Dumazet wrote:
>
> > + case SO_NETNS_COOKIE:
> > + lv = sizeof(u64);
> > + if (len < lv)
> > + return -EINVAL;
>
> if (len != lv)
> return -EINVAL;
>
> (There is no reason to support bigger v
On 2/19/21 10:51 AM, 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 S
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