]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net: ipv6: Add ip6_mr_output()
authorPetr Machata <petrm@nvidia.com>
Mon, 16 Jun 2025 22:44:18 +0000 (00:44 +0200)
committerJakub Kicinski <kuba@kernel.org>
Wed, 18 Jun 2025 01:18:46 +0000 (18:18 -0700)
commit96e8f5a9fe2d91b9f9eb8b45cc13ce1ca6a8af82
tree7c103ecb927c2b2ec3587292587afec8e1aa8426
parent1b02f4475d29c6e2c4b7f1bae74149b9c1369791
net: ipv6: Add ip6_mr_output()

Multicast routing is today handled in the input path. Locally generated MC
packets don't hit the IPMR code today. Thus if a VXLAN remote address is
multicast, the driver needs to set an OIF during route lookup. Thus MC
routing configuration needs to be kept in sync with the VXLAN FDB and MDB.
Ideally, the VXLAN packets would be routed by the MC routing code instead.

To that end, this patch adds support to route locally generated multicast
packets. The newly-added routines do largely what ip6_mr_input() and
ip6_mr_forward() do: make an MR cache lookup to find where to send the
packets, and use ip6_output() to send each of them. When no cache entry is
found, the packet is punted to the daemon for resolution.

Similarly to the IPv4 case in a previous patch, the new logic is contingent
on a newly-added IP6CB flag being set.

Signed-off-by: Petr Machata <petrm@nvidia.com>
Link: https://patch.msgid.link/3bcc034a3ab4d3c291072fff38f78d7fbbeef4e6.1750113335.git.petrm@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/linux/ipv6.h
include/linux/mroute6.h
net/ipv6/ip6mr.c
net/ipv6/route.c