l3mdev_fib_rule_match(9)
β¨ l3mdev_fib_rule_match β¨
okay so bestie, this one's a kernel API page β the l3mdev_fib_rule_match(9) manual, no cap π
β and it's literally just one little function that answers one little question for you. Let's get into it π«Ά
πΈ NAME πΈ
l3mdev_fib_rule_match β figure out whether a flowi is referencing an L3 master device π
Like, that's the whole vibe check. You hand it a flow, it tells you if that flow is pointing at an L3 master device. Iconic, honestly.
π¦ SYNOPSIS π¦
int l3mdev_fib_rule_match (struct net *net , struct flowi *fl , struct
fib_lookup_arg *arg );
Three args in, an int out. She's simple, she's efficient, she's serving exactly one purpose π
π ARGUMENTS π
netβ the network namespace you want to do your device index lookup in π that's her whole job here, bestie.flβ the flow struct π¨ literally the flow we're asking about, the main character of this whole operation.argβ this is where you stash the table that the rule matched with, right here in this struct π₯ it's giving "output parameter" and we respect it.
π SEE ALSO π
if you're going down this rabbit hole (and honestly, slay, go off), peep the kernel file ./net/l3mdev/l3mdev.c β that's where the lore lives πβ¨ and also these absolute legends:
l3mdev_master_ifindex_rcu(9)l3mdev_master_upper_ifindex_by_index_rcu(9)l3mdev_fib_table_rcu(9)l3mdev_link_scope_lookup(9)
fr fr, they all hang out in the same neighborhood π§
mwah π that's the whole page, bestie β no crumbs left behind. This little gem lives out of ./net/l3mdev, and this particular snapshot is dated October 2026 π
(yes, the future, we're ahead of the game π). Go forth and match some fib rules ππ¦πΈ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms