Re: [PATCH net-next] Extending bpf_setsockopt with SO_BINDTODEVICE sockopt

From: Andrii Nakryiko
Date: Thu May 21 2020 - 15:10:02 EST


On Thu, May 21, 2020 at 5:54 AM Ferenc Fejes <fejes@xxxxxxxxxxx> wrote:
>
> This option makes possible to programatically bind sockets to netdevices.
> With the help of this option sockets of VRF unaware applications
> could be distributed between multiple VRFs with eBPF sock_ops program.
> This let the applications benefit from the multiple possible routes.
>
> Signed-off-by: Ferenc Fejes <fejes@xxxxxxxxxxx>
> ---
> net/core/filter.c | 39 ++++++++++++++++++++++++++++++++++++++-
> 1 file changed, 38 insertions(+), 1 deletion(-)
>

I'll let more networking-familiar folks to comment on functionality,
but features like this needs tests in selftest/bpf.

> diff --git a/net/core/filter.c b/net/core/filter.c
> index 822d662f97ef..25dac75bfc5d 100644
> --- a/net/core/filter.c
> +++ b/net/core/filter.c

[...]