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(-) >