Re: [PATCH bpf-next v2 1/4] bpf: Initialize the l3mdev field for the fib lookup flow

From: Toke Høiland-Jørgensen

Date: Wed Jun 17 2026 - 05:12:29 EST


> The helper already initializes the other flow fields the rules path
> consumes (flowi4_mark, flowi4_tun_key.tun_id, flowi4_uid and the v6
> counterparts); flowi*_l3mdev was added to that set afterwards and this
> helper was never updated to match. ip_route_input_slow() likewise zeroes
> the field before its input lookup. Do the same here.

So how about we explicitly zero-init the whole struct instead of adding
more fields ad-hoc like this? Otherwise this seems like something that
is likely to happen again if we ever add another field to the struct?

-Toke