Re: [PATCH bpf] bpf: Fix fib lookup when ifindex is not set

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12/22/21 8:15 AM, Martynas Pumputis wrote:
> Previously, bpf_ipv{4,6}_fib_lookup() with !BPF_FIB_LOOKUP_DIRECT
> required a netdev identified by bpf_fib_lookup->ifindex to exist even if
> the netdev's FIB table was not used for the lookup.

there is no 'netdev FIB table'; there is only a FIB table.

The ifindex is essential information for the lookup and for verifying
forwarding is allowed on the interface.

> 
> This commit makes the ifindex mandatory only if BPF_FIB_LOOKUP_DIRECT is
> set.
> 
> Fixes: 87f5fc7e48d ("bpf: Provide helper to do forwarding lookups in kernel FIB table")
> Signed-off-by: Martynas Pumputis <m@xxxxxxxxx>
> ---
>  net/core/filter.c | 30 +++++++++++++++++-------------
>  1 file changed, 17 insertions(+), 13 deletions(-)
> 




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux