HomeFreeBSD

ip_mroute: Make the routing socket private

Description

ip_mroute: Make the routing socket private

I have some patches which make ip_mroute and ip6_mroute multi-FIB-aware.
This enables running per-FIB routing daemons, each of which has a
separate routing socket.

Several places in the network stack check whether multicast routing is
configured by checking whether the multicast routing socket is non-NULL.
This doesn't directly translate in my proposed scheme, as each FIB would
have its own socket. I'd like to modify the ip(6)_mroute code to store
all state, including the socket, in a per-FIB structure. So, take a
step towards that and 1) hide the socket, 2) add a boolean flag which
indicates whether a multicast router is registered.

Reviewed by: pouria, zlei, glebius, adrian
MFC after: 2 weeks
Sponsored by: Stormshield
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D55236

(cherry picked from commit d19fd2f349226116f7effb281baa1eb32b8292e7)

Details

Provenance
markjAuthored on Feb 13 2026, 4:50 PM
Reviewer
pouria
Differential Revision
D55236: ip_mroute: Make the routing socket private
Parents
rGd94862ceb2b0: ip_mroute: Try to make function pointer declarations more consistent
Branches
Unknown
Tags
Unknown