Page MenuHomeFreeBSD

ip_mroute: Start moving globals into a structure
ClosedPublic

Authored by markj on Feb 10 2026, 10:10 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Apr 13, 10:17 PM
Unknown Object (File)
Sun, Apr 12, 10:18 PM
Unknown Object (File)
Sat, Apr 11, 10:33 AM
Unknown Object (File)
Thu, Apr 2, 4:41 AM
Unknown Object (File)
Mar 14 2026, 5:14 PM
Unknown Object (File)
Mar 14 2026, 12:12 PM
Unknown Object (File)
Mar 13 2026, 9:43 AM
Unknown Object (File)
Feb 28 2026, 8:35 PM

Details

Summary

I would like to support per-FIB multicast routing tables, such that one
can run a routing daemon per-FIB, with each daemon oblivious to the
existence of others. Currently the multicast routing code is completely
unaware of FIBs.

To that end, start collecting various global variables in ip_mroute.c
into a per-VNET struct mfctable. In a future patch this will be
expanded into an array of mfctable structures, one per FIB. For now,
all of the state is collected into V_mfctables[0].

Each mfctable contains, among other things:

  • a pointer to the routing socket, if routing is enabled,
  • a hash table of routing cache entries,
  • an table of network interfaces participating in the routing configuration

This change has no functional effect, it is just factoring out these
global variables to make the subsequent patches simpler.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable